Transfer WordPress sites to new servers fast and safely


2) Prepare your blog in the old location

1. Export your database

* Enter the Plugins admin section of your old dashboard, deactivate and delete any plugin that you won’t need in the new home of your blog.

* Install Better Delete Revision plugin or any plugin that will clean your database, and delete all stored revisions of your posts, if you are sure you won’t need them.

* Install BackWPup, a plugin that backs up a blog’s database even regularly. It can also backup files (plugins etc), but we don’t need that. FTP allows better control of what and how is transferred, making a mistake less possible.

* Create a new backup job and in its settings select to backup only the database and a simple (txt) list of your plugins. Select the “Backup to Folder” option.

If you feel (and have reasons to be) confident, you can deselect (exclude from the backup) database tables of plugins that you won’t use in the new installation of your blog. Leaving them as they are won’t harm; better keep them, if you are not absolutely sure you know what to delete or not. In the same tab (DB Backup) put a checkmark in the Gzip option to have the sql (database) file compressed.

Go to the “Jobs” menu to run your new backup job. When the plugin finishes your backup (its a matter of seconds), click again on the “Jobs” menu to refresh the page and download the backup file to your PC. Extract its content in a clean folder.

You must see there at least an SQL file (compressed or not), that contains your database, and a txt file that contains the list of your plugins.

2. Save your files

* Enter the Themes folder of your blog in the old server using your FTP client or the File Manager of your host and delete all the themes you are not going to use in the new installation. Clear the Cache of your blog.

Download to your PC the whole wp-content folder, which contains your themes, your uploaded media files, etc. Download also any other file or folder that does not belong to the core system of WordPress, but was created and uploaded by you in any folder of your old site. Make sure you won’t forget anything.

Do NOT download the Plugins folder from your old wp-content folder. Plugins may contain a lot of files so that downloading and uploading them again in the new server is time consuming. You don’t have to do this, because there is a speedier way to move your plugins, without even making a backup! Just keep reading…

3) Restore your blog to its new home

a. Install your plugins

* FTP to the new home of your blog the files you downloaded from the old location, the wp-content folder, etc., replacing anything with the same name that may already exist in the new server.

* Use your temporary (alias) url to enter the dashboard of your blog and install Multi Plugin Installer, a plugin that is able to bulk install any number of plugins if you feed it with just their names.

Open the admin page of Multi Plugin Installer; in the relevant textbox paste the names of your plugins (they are included in the list that you saved in your backup above.) Choose to install them all, but without activation. Multi Plugin Installer establishes a connection to the WordPress official pages, downloads and installs the plugins one by one. If you have some heavy plugins, containing a lot of files, such as TubePress, you may face connection problems, in which case just install these plugins separately.

After Multi Plugin Installer finishes, it displays a report. Make sure all your plugins are downloaded and installed. It may happen that plugins you use for some time, they are now removed from the WordPress official pages because their development stopped. Such plugins, assuming they are still working for you, must be saved manually from your old server and uploaded / installed on your new server; you can use for them FTP or your dashboard’s New Plugin > Upload feature to get them from your PC.

b. Import the database

* Install Adminer, a plugin that manages a blog’s database and is able to import databases. Open its admin page (in the “Tools” menu) and select the “import” option.

Locate the SQL file (it can be compressed) of your backup and import your database. In case that your database is large, let’s say 10 mb or more even when it is compressed, you may face connection issues importing it. Adminer is able to import very large files, but your server may be configured to stop the execution of scripts after a certain time. You can gzip your database, upload it in the directory where Adminer is installed at “wp-content/plugins/adminer/inc/adminer”, making sure it is named “adminer.sql.gz” and import it using the option “From Server,” instead of from your PC.

* After your database is restored you may need to login again, in which case you will be redirected to the old version of your blog, because the imported settings have no idea that you are using a temporary alias url.

To escape this trap, open your wp-config.php file (at the root of your new WordPress installation), using the File Manager of your host or your FTP client, to add these two definitions:

define('WP_HOME','http://yourTEMP-alias-domain.com');
define('WP_SITEURL','http://yourTEMP-alias-domain.com');

c. Finalize the transfer

* Login to the dashboard of your new blog with your old familiar username and password (they are imported when you restored your database), and check that everything works as expected.

— Check your Permalinks scheme at the “Permalinks” section of your dashboard. Since it was imported from your database, the scheme should appear fine, however, confirm it by pressing the “Save” button and watch for WordPress messages at the top of the page. You may need to change file permissions in order for WordPress to configure Permalinks properly.

— After Permalinks are confirmed, change file permissions to make them more restrictive and disable also web (debug) errors if you had them enabled. Some problems that seem severe at this stage, may come from file and folder permissions. Some folders inside the wp-content folder need write and delete permissions, such as the cache folder. If you don’t know how to handle permissions, the support team of your new host can help you.

* Check your plugin settings and make sure they work. Browse all the main sections of your web site to see if everything works.

* Now it’s time to edit again your wp-config file to remove those two definitions concerning the temporary alias url.

* Go to the web page of your registrar and change the DNS settings for your domain, informing this way the internet to access your pages in the new server and ignore the old. — Delete the temporary alias url at the control panel of your new host.

Allow 2 days for a full propagation of DNS changes, until your blog is available only in the new server. While waiting, make other crucial adjustments on your account, such as replicating email addresses. Note that you may be able to access your site in the new server before your email addresses are functional.

Enjoy!

    Comments are closed