There are many ways to accomplish WordPress site migration. The easiest option is to use a site migration plugin. You could also opt for the manual process but that’s more time consuming. In this post, I will focus on two of the most popular plugins and briefly discuss the manual process involved in WordPress site migration. Before diving into WordPress site migration, let’s have a high-level overview of WordPress.
What is WordPress?
WordPress is an application that resides on a web server and interfaces with a database. The database is modified every time you add content and change the settings in the WordPress back-end. In WordPress, the content and the application are separate. This means you can replace WordPress with a different version and everything will remain the same.
However, the themes, plugins, uploads, and database can’t be replaced. Themes control the appearance of a WordPress site. Plugins extend the functionality of WordPress by adding, changing or deleting a feature. Uploads are files (e.g. documents and images) that are uploaded to the WordPress site. The database stores posts, pages, categories, custom fields, etc. as well as settings in the WordPress dashboard. WordPress uses several different programming languages including PHP, MySQL, HTML, CSS, and Javascript. PHP is the main programming language of WordPress, which it uses to store and retrieve data from the database.
WordPress site migration
WordPress site migration is the process of moving themes, plugins, uploads, and database from one location to another. Duplicator and All-in-One WP Migration are the two most popular plugins used for this purpose. I have had the experience of using both. Below I will briefly discuss the two plugins and the difference between them.
Duplicator plugin
The Duplicator plugin is used to create two files in the origin location:
- an archive file containing site data and the database
- an installer.php file that extracts and installs the archive in the target location.
Once the files have been downloaded, they are then uploaded to the target location. The installer file is ran by accessing it via your browser. Next, the installation will let you either create a new database or connect your site with an existing one. During the installation process, you will need to replace old URL with the new URL and old file path with the new path. Moreover, Duplicator will provide a report on possible problems and remind you to update your permalinks and cleaning up temporary files if applicable.
All-in-One WP Migration plugin
The All-in-One WP Migration plugin is much easier to use than Duplicator. First, install the plugin in both the origin and target locations. Next, export a file containing themes, plugins, uploads and the database in the origin location. Then, import the file in the target location and save the permalinks to correct a known WordPress bug. The plugin is smart enough to detect the old and new site URLs and perform all necessary database adjustments by itself. With the free version, you may encounter a file import limit problem during the import process. If that happens, follow the instructions for increasing the file limit.
Manual process for migrating a WordPress site
While it is great to have the plugins do the work for us, it is still useful to understand the manual process. For example, when I moved a site from a multisite installation to a single site installation, I couldn’t used the free versions of the two migration plugins. Therefore, knowing how to do it manually was absolutely essential.
Manual WordPress site migration is a three-step process:
- Install the latest version of the WordPress application on the target location.
- Move all the files (themes, plugins, and uploads) to the target site using File Transfer Protocal (FTP) or via the cPanel.
- Migrate database, which is the most complicated because of the differences between the origin site and the target site (e.g. different URLs, different drive, and folder structure).
For step 2 above, you could also manually install the themes and plugins needed in the target site’s WordPress back-end. There is no need to activate the themes or the plugins if you use this approach; activation will occur once the database is moved. At this point, the Media library will be empty because every media file is a post in the database. Since the database hasn’t been moved, WordPress is unaware that the files exist.
Finally, you have the option of using a plugin such as WP Migrate DB plugin (free) to move the database. For specific steps involved, please consult this article on database migration using WP Migrate DB plugin.
WordPress site migration is an essential part of the web development process. Knowing which plugin to use and understanding the manual process are crucial to WordPress site migration.