Documentation

WordPress Installation On Lightsail Via SSH

Create a configuration for your domain if you haven’t yet..

$ cd /etc/apache2/sites-available

$ nano DOMAIN_NAME.conf

<VirtualHost *:80>
    ServerAdmin admin@DOMAIN_NAME
    ServerName DOMAIN_NAME
    ServerAlias www. DOMAIN_NAME
    DocumentRoot /var/www/html/ DOMAIN_NAME
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

CTRL + w it will ask you if you want to save the file then save the file and then execute the command a2ensite DOMAIN_NAME.CONF it will ask you to restart apache2 service then use the command it’s literally yelling at you to use.. Yeah.. Apache2 is basically a needy girlfriend.. Now

Create a Database in PhpMyAdmin which is at our Server IP/phpmyadmin

Log into SSH and follow these simple steps


$ now mkdir /var/www/html/DOMAIN_NAME

$ cd /var/www/html/DOMAIN_NAME

$ curl -O https://wordpress.org/latest.tar.gz

$ tar xzvf latest.tar.gz

$ sudo chown -R www-data:www-data /var/www/html/DOMAIN_NAME

$ nano /var/www/html/DOMAIN_NAME/wp-config.php

edit the database name, user and password. Then Ctrl + W which will ask you if you want to save the file and then say YES to save the file.

Powered by BetterDocs

Leave a Reply