Installing Wordpress on Micronode Instances Print

  • 5

Setting up the Micronode Instance

First create an instance on the Micronode panel, you will need to spec this appropriately. We recommend a minimum of 256MB RAM and 5GB Disk for a wordpress installation. This guide has only been tested on Debian. 


Create a loadbalancer


Once your instance has been provisioned you will need to create a Loadbalancer. The loadbalancer DNS name must match the name of the domain or subdomain that you will use for your wordpress website.


The backend host must match the instance you provisioned for your wordpress install.



Setting up DNS


You must now update DNS to point your domain name to the loadbalancer. This is done by creating a CNAME record pointing to the loadbalancer endpoint which can be found in the panel:




If you are using cloudflare you must initially set up the DNS record without the cloudflare proxy for validation purposes.

DNS can take up to 24 hours to propagate, SSL is automatically added once DNS has updated, the SSL check occurs every 10 minutes.



Installing Dependencies

SSH to your Micronode instance and first install the wordpress dependencies: 

[email protected]:~# apt update

[email protected]:~# apt install php-fpm php-mysql nginx mariadb-server nano wget

 

Configuring Nginx

Open your new nginx config file in a text editor. Replace wordpress-1.micronode.uk with your domain.


nano /etc/nginx/sites-enabled/wordpress-1.conf

 

server {

        listen [::]:80;

        root /opt/wordpress-1/wordpress;

        index  index.php index.html index.htm;

        server_name wordpress-1.micronode.uk;




        error_log /var/log/nginx/wordpress-1_error.log;

        access_log /var/log/nginx/wordpress-1_access.log;




        client_max_body_size 100M;

        location / {

                try_files $uri $uri/ /index.php?$args;

        }

        location ~ \.php$ {

                include snippets/fastcgi-php.conf;

                fastcgi_pass unix:/run/php/php7.3-fpm.sock;

                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;

        }

}





Install Wordpress


Create a directory for your wordpress install. This must match the root in the nginx config configured above.

cd /opt/

mkdir wordpress-1

wget https://en-gb.wordpress.org/latest-en_GB.tar.gz

tar -xf latest-en_GB.tar.gz -C  wordpress-1/



systemctl restart nginx

 

Create the WordPress Database

 

mysql




CREATE DATABASE wordpress;

CREATE USER wordpress IDENTIFIED BY 'STRONGPASSWORD';

GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'%';

FLUSH PRIVILEGES

exit



Set The Permissions for the wordpress directory

chown www-data:www-data -R /opt/wordpress-1/

 

nano /opt/wordpress-1/wp-config.php

 

Add the following before:

require_once ABSPATH . 'wp-settings.php';



if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)

       $_SERVER['HTTPS']='on';





define( 'WP_HOME', 'https://wordpress-1.micronode.uk' );

define( 'WP_SITEURL', 'https://wordpress-1.micronode.uk' );



Navigate to your domain and complete the wordpress setup!


Was this answer helpful?

« Back