Learn How To Create Free Website And Install WordPress On Your Ubuntu 16.04 Or 18.04 LTS Remote Server (VPS)

Before starting we recommend you to start with part 1 or my previous blogs. After following all 34 steps of all my previous blog’s parts follow the below mentioned instructions to install WordPress.

35. Download latest version wordpress zip file from internet to your computer

36. Extrect that zip file and rename this file to ‘html’

37. Open that html folder and find wp-config-sample.php file

38. Rename wp-config-sample.php file to ‘wp-config.php’

39. Open and edit this wp-config.php file in note ++ or any other editor

-: Change or add phpmyadmin database name (The Database you have created in phpmyadmin. ( View step 18 part 1.)

-: Change or add mysql username and password ( Which you have created in step 17 part 1 )

40. Save the wp-config.php file and convert html folder to html.zip file by winrar app on your windows computer.

41. Now access your remote server(VPS) via FTP server through FileZilla app on your windows computer and upload that html.zip to /var/www

42. Open putty and login to your remote server. Run below mentioned command to unzip html.zip and to delete empty html folder and file.

cd /var/www

sudo rm -r html

sudo unzip html.zip

sudo rm -r html.zip

43. Create .htaccess file into html folder and download it to your computer by FileZilla. Edit this file with note ++ and copy paste the below mentioned codes and save it.

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

If your are using SSL (HTTPS) add below mentioned codes

RewriteEngine On 
RewriteCond %{HTTPS} !on 
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ 
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

44. Upload and overwrite this .htaccess file to html folder of your server by Filezilla.

45. Now login to you server via putty and give permissions to apache2 to WordPress by run following commands

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

sudo chmod 775 /var/www/html/wp-content

46. Open your domain or server’s ip address to any browser and you will be on WordPress installation page. Fill the form and it will direct you to WordPress dashboard.

Now done with this part. You can create your website by installing themes and plugins. Enjoy. Click Here to know best WordPress Plugins.