How to move a WordPress site to another host

This is one nice simple way to move a WordPress installation, usually a blog, from one hosting service to another. Web hosting companies can turn flaky anytime, so it’s always good to know your escape route.

1) Login to the CPanel at the existing host. Always keep this login handy, at least be able to find the original welcome message from when you bought the hosting, or do a password reset to your original email address.

Compress and download

Compress and download

2) From the file manager, navigate to public_html, then to the files for the domain name in question, and highlight the wp-content directory.  Click on “Compress” , Compress files, then highlight the resulting file and “download” to download it to your computer.

3) Now go back to the main CPanel tab and scroll down past File, Logs, Security etc to Databases and go into “php MyAdmin”. Select the database that belongs with your site. If you have multiple domains on the one account, created the WordPresses with a script and don’t know which of the many databases it should be then you’ll need to go back into the file manage and view the wp-config  file to find out. Select “Export” and “Go”. This will download a file called something like “database_name.sql” in your downloads folder on your computer.

4) Now is a good time to switch over the DNS records for your domain name at your domain registration account so that they point to the dns servers for the new hosting. That’s just like buying a new domain name and pointing it at your own hosting, except that you are amending your existing record there to replace one pair of nameservers with the new set. The exact entry you need to put in for the nameservers will have been sent to you when you purchased  the new hosting account.

5) Log into the cPanel for the new hosting and choose “Add On Domains” to set up the transferred domain there.

6) Now use Fantastico or Scriptaculous or SimpleScripts, whichever is provided under Software/Services  to set up a brand new WordPress install into the top level directory just created by adding the domain. This will create a new database, database user and WordPress files and directories for a new empty site with just one “Hello World” post.

7) In the File Manager at the new hosting, go into the domain name top level directory and upload the file from step 2. You should see the wp-content folder created by the script and now the there as well, a bit further down.

cPanel File Manager

cPanel File Manager – WP-Content

Highlight and “Extract” to overwrite the contents with the plugins, themes and media files from the old installation.

8) Now go into “php MyAdmin” at the new hosting and find the new database set up by the installation script. You might like to make a backup, but then blank it by choosing operations, Structure, check all and “Drop”.  Now select “import”, choose the file created in step 3 and  away you go. All the settings and tweaks and options and things will have been duplicated in the new site from the old one, but in a nice and clean new WordPress installation.

9) When the dns changes have propagated through the new version of the site will be visible with very little noticeable changes. There may be a new “Hello World” post at the top of the lastest posts which can be moved to trash.

Leave a Reply

Your email address will not be published. Required fields are marked *