How to Migrate WordPress Site to A Cloud VPS Server

0
19

Learn how to migrate a WordPress website from share hosting to a cloud vps server. In the tutorial, you will learn how to move your WordPress site from Hostgator cloud hosting to Vultr cloud vps.

First of, I will show how to do the backup of your original WordPress files such as mysql database and wp-content folder.

Then, you will learn how to import your database exported file using phpmyadmin. At the time, I also show to how increase the limitation of maximum upload file size by editing the php.ini and nginx.conf

After, you will learn how to rebuild the WordPress system files and associate them with your imported database. Also, I will show how to change WordPress site url using wp-config.php

Finally, you will learn how to migrate WordPress to new server by uploading the backup of wp-content folder. Also, I will discuss a few things related to migration problem such as 500 https errors and how fix the problem.

Prerequisite tutorials:

1: How to setup and secure Vultr VPS on Ubuntu 16

2: How to Install LEMP stack on Ubuntu 17

3) How to Install PHPMyAdmin on Nginx In Ubuntu 17

RELATED VIDEOS:

Hostgator Cloud Hosting Vs Vultr Cloud VPS (hosting review)

Vultr Review: Vultr VPS Vs Digital Ocean

COMMANDS USED IN THE TUTORIAL:

1) Edit php.ini for big file import

sudo nano /etc/php/7.0/fpm/php.ini

upload_max_filesize = 32M
max_file_uploads = 68
post_max_size = 32M

sudo nano /etc/nginx/nginx.conf

#Set client max body size to 32M
client_max_body_size 32M;

sudo systemctl restart php7.0-fpm
sudo systemctl reload nginx

2) CONFIGURE NGINX HOST FILE

sudo nano /etc/nginx/sites-available/default

location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php$is_args$args;
}

location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* .(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}

sudo nginx -t

sudo systemctl reload nginx

3) Rebuild WordPress system

sudo apt-get install php-curl php-gd php-mbstring php-mcrypt php-xml php-xmlrpc

sudo systemctl restart php7.0-fpm

cd /tmp

curl -O

tar xzvf latest.tar.gz

cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php

sudo cp -a /tmp/wordpress/* /var/www/html

sudo adduser kimseasok www-data
sudo chown -R kimseasok:www-data /var/www/html
sudo chmod -R g+rwX /var/www/html

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

RECOMMENDED PRODUCTS (affiliate)

Get 60% Discount from Hostgator hosting:

Get $20 Free Vultr hosting credit:

Grab KLEO Premuim WordPress Theme:

FOLLOW ME:

Blog:

Facebook:

Twitter:

Subscribe Channel:

Mail List:

SUPPORT ME:

Buy Me a Coffee:

source

LEAVE A REPLY

Please enter your comment!
Please enter your name here