How to Upgrade WordPress Server from Ubuntu 16.04 to Ubuntu 18.04

How to Upgrade WordPress Server from Ubuntu 16.04 to Ubuntu 18.04. Right now, Ubuntu 18.04 has been released with tons of new features. Upgrading your Server from Ubuntu 16.04 to Ubuntu 18.04 is a good idea but it requires some precautions when you are moving forward to upgrade your server. Upgrading your servers are so easy with given step by step method. You can easily upgrade your WordPress server hosted with LAMP or LEMP stack with this tutorial. It will upgrade all packages and kernel to latest version so that you can use its latest features and advanced security modules. This tutorial explain you how to smoothly upgrade your WordPress server from Ubuntu 16.04 to Ubuntu 18.04 so easily.

Step-1 : Create a backup or Snapshot of your WordPress Server

Note: As a precaution, first of all create a backup or snapshots before proceeding to upgrade and If anything goes wrong then backup or snapshots will help you to restore your WordPress website in a last working state.

Connect your WordPress sever using SSH and create a backup. You can also use your VPS hosting backup solutions like snapshots. This feature will help you to manually create a backup using snapshots.

Step-2 : Upgrade from Ubuntu 16.04 to Ubuntu 18.04 using its upgrade scripts

Now, Update package repository to latest:

$ sudo apt-get update

Next, Upgrade packages:

$ sudo apt-get upgrade

You will remove unwanted packages and upgrade Ubuntu 16.04 LTS to the latest version:

$ sudo apt-get dist-upgrade

Finally run the upgrade scripts:

$ sudo do-release-upgrade

Follow all the instructions during the running of upgrade scripts.

Step-3 : After upgrade finally your WordPress shows you 404 error.

Now find and replace it with correct version of PHP from PHP7.0 to PHP7.2

For Apache

Edit Apache virtual host:

$ sudo nano /etc/apache2/sites-available/example.com.conf
$ sudo nano /etc/apache2/sites-enabled/example.com.conf

Edit Apache configuration file:

$ sudo nano /etc/apache2/apache2.conf

Restart the Apache services to make changes in effect:

$ sudo systemctl restart apache2
For Nginx

Edit Nginx server blocks:

$ sudo nano /etc/nginx/sites-available/example.com
$ sudo nano /etc/nginx/sites-enabled/example.com

Edit Nginx configuration file:

$ sudo nano /etc/nginx/nginx.conf

Restart the Nginx services to make changes in effect.:

$ sudo systemctl restart nginx

If this still shows you error then look carefully which packages has been upgraded. This given table will help you to find out issues.

Step-4: Each Package version comparison table from Ubuntu 16.04 to Ubuntu 18.04

This table can help you to make changes to your configuration files for resolving issues.

Ubuntu 16.04 Ubuntu 18.04
Apache 2.4 2.4
Nginx 1.10 1.14
PHP 7.0 7.2
PHPmyAdmin 4.4 4.6
MySQL 5.7 5.7
MariaDB 10.0 10.1
PostgreSQL 9.5 10.0

Congratulation now you have upgraded your WordPress server from Ubuntu 16.04 to Ubuntu 18.04. Now you will take advantage of latest feature and security for your server. If you have issues regarding this tutorial then you will use the comment section below.

Hot Right Now

Related Post

COMMENTS