Manually Moving a WordPress Site from one Server to Another

Moving a WordPress site from one server to another is a task that requires your hands to get dirty and play around with site software.

Firstly, the task is easier when you are moving a site from one domain to another if both of these domains are hosted on the same server.

It gets a little hairy if the sites are hosted on different hosts. The difficulty arises due to both sites using different server software or software that has different versions.

Most large hosting companies use custom Panels and usually don’t update as often as smaller hosting companies.
Updates tend to introduce errors for existing sites. This is another topic and we’ll just leave it at that.

The steps to follow are easy to follow and need a little bit of technical knowledge.
If you’re new to MySQL, PHP, phpmyadmin, CPanel or you don’t have the prerequisite knowledge for any of these then the task will be a hard one for you. But, it is not impossible since once upon a time I was also a novice and did not know what a hosting was. We all go through that path to learn and educate ourselves.

Talking of education it is almost free to educate yourself in many technical areas. Just Youtube any topic that interests you and you have 100’s of people who have shared their knowledge. Just like this article.

What you will need for this are: CPanel Hosting and WordPress. It is possible to move a WordPress to another Panel type but that is not covered here.

Here’s the steps in general. Details further down.

On the Site you are going to duplicate:

  1. Make a backup of your existing website and put that aside using CPanel Backup Procedure
  2. Compress and download the content directory with Filemanager and any other custom files and directories on the server.
  3. Log into PhpMyAdmin within CPanel and export the database for the site.

On the New Site You are Going To Create the Site

  1. Log into CPanel and Upload the “wp-content” from step (1) directory to the root “public_html” folder.
  2. Rename the original “content” to “wp-content–” and then uncompress the backup file you’ve just uploaded.
  3. Open phpMyAdmin and import the database from step (3).

Not finished – Hands going to get dirty here

  1. Editing the Options table in the WordPress Database and fixing settings in wp-config.php file.
  2. Refresh new site and you should have the site moved without any problems.

I would like to say that it took me less time to do the above procedure than to write this article so far.

There are many plugins and tools to do this automatically but I find it easier to do this manually allowing me total control of the whole process.

How to exclude a sub-folder from WordPress control?

How to exclude a sub-folder from WordPress control?

Here is a quick fix for those who have come across this problem and looking for a solution to stop WordPress from redirecting.

If you have WordPress website with a sub folder that needs to be outside the control of WordPress then this little fix will get rid of your headache.

This requires editing the .htaccess file either from your ftp account/cpanel or via the WordPress dashboard with admin login. If you don’t know how to edit your .htaccess file from within your WordPress then search for plugins that allow you to edit this file.

It is a simple change and most websites have already a default .htaccess file.
Within the htaccess file locate the following code:

# BEGIN WordPress

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

# END WordPress

Change the following line from this

RewriteRule . /index.php [L]


RewriteRule ./ /index.php [L]

and that is pretty much all you need to do. It was a life saver for me.
I wanted to use this so that I can password protect a private use folder.
I use this particular folder to store personal documents that I can view from any place or computer and I need to provide valid user login details.
If you’re using CPANEL you can set this up in the “Directory Privacy” icon.

Have a great day!