Migrate Wordpress to New server

Migrate Wordpress to New server Host on DigitalOcean

Regarding certbot is not longer support on ubuntu 14.04 LTS this will cause we can't renew the Let's Encrypt Certificates on our wordpress server this will cause our domain become unsecure mark on all browser.

The current server host is almost running 6 years and more . Is time to update due the security issue .

I try to Upgrade to current server from Ubuntu 14.04 LTS to Ubuntu 16.04 LTS because the certbot software tool minimum support version is Ubuntu is 16.04 LTS . But i have no luck since update the current running server is difficult and painful.

So the better solution is Migrate Wordpress to New server.

Any Migrate action first step always is backup all the related files, content and the most important thing The database.

1) Export Wordpress MySQL database

Export Wordpress MYSQL database by phpMyAdmin

Go to Wordpress Tables > Export Section > Choose the Export Format SQL and click the Go button.

You should download a files like YouWordpressTablesName.sql

This sql file is all data not include Media files (images, video, audio) on Wordpress MySql database is only store the Media files URL path only.

After download please make sure this files is secure.

We can Migrate our Wordpress to any New server using this sql file.

2) Backup Whole Wordpress CMS or Backup Content Files only

To backup server files we need Connect server host with FileZilla software. FileZilla software is most quick and easy way and it support all OS platform.

2a) You can only backup wp-content and replace this on latest version Wordpress

You can do this when you new server or host already include or build-in with Wordpress . Example like Digital Ocean One-Click Droplet

Login You Server host on FileZilla and go to Wordpress location find the wp-content folder and backup it

default location is /var/www/html/wp-content

2b) Backup Whole Wordpress CMS files

Login You Server host on FileZilla and go to the Wordpress main location and backup all the files

default location is /var/www/html/

3)Change phpMyAdmin PHP Import Max file size

By Default phpMyAdmin Import Max file size is set to 2MB if you sql file size is more than 2MB you will need to modified the php.ini for increase Import Max file size.

Method to find correct PHP.ini files location is create a php files with phpinfo function and check on it.

3a)Find PHP.ini files location

PHP Code for check the PHP.ini, Upload this to you new server.

<?php

phpinfo();

?>

check on the Loaded Configuration File you will get the PHP.ini location. Digital Ocean Server Default location is

/etc/php/7.2/apache2/php.ini

After find php.ini file location, Delete the phpinfo php file immediately on you server due the Security issue.

3b)Modify PHP.ini files to increase upload size

Open the php.ini with nano

nano /etc/php/7.2/apache2/php.ini  

search for post_max_size and upload_max_filesize increase the size.save the change .

Restart Apache Server

sudo systemctl restart apache2  

4) Import Wordpress MySQL database on new Server Host

You will new create a database before import data.

4a) Create databas

Go to Databases > Create database

Database Name is the Export sql file name

Collation need to match with Export sql files collation you can open the sql file and check or use utf8_general_ci for most general case.

4b) Import database

Import Wordpress MYSQL database by phpMyAdmin

Go to Wordpress Tables > Import Section > Choose the sql file we download just now and click the Go button.

4) Update Wordpress and Plug-in

Update the Wordpress and Plug-in to the latest version on you new server host.

Normally you can update this on Wordpress Dashboard but i will strongly recommend don't use this FTP method to download ,

The better way is download the files and upload by FileZilla .

for Wordpress you can download latest version on here

https://wordpress.org/download/

download unzip and replace all the files on except wp-content folder

Beware don't replace your wp-content folder

for Wordpress plugin

https://wordpress.org/plugins/jetpack/

you can replace on wp-content > plugins folder

5) Upload The WordPress Files Or wp-content To Your New Server Host

for wp-content

Copy the wp-content and replace it on

/var/www/html/wp-content

for Backup whole WordPress site just copy and replace all the files on public html folder

/var/www/html/

6) Update Domain DNS records

Update you Domain name with the New Server Host IP address , for Digital Ocean you just need go to Networking > Domain > select you domain name > More > Manage domain

Edit A record directs to new IP address

Done the Migrate.

For New user you can use my referral link to register Digital Ocean and get Free credit active: Get started on DigitalOcean with a $100, 60-day credit for new users.

my DigitalOcean referral link

https://m.do.co/c/6ca3326e1aa6