How do you migrate a WordPress site from a local computer to a web server? There are many ways of accomplishing this. The easiest would be to use a site migration plugin. You could also opt for the manual process but that’s relatively 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 I dive into the topic of WordPress migration, I will provide a high-level overview of Wordress.
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, meaning that you can replace WordPress with a different version and everything will remain the same.
WordPress migration is the process of moving everything other than the application (themes, plugins, uploads, and database) from one location to another, typically from the local computer to the server. The two most popular plugins used for this purpose are Duplicator and All-in-One WP Migration. I have had the experience of using both. Below I will briefly talk about the two plugins and the difference between them.
The Duplicator plugin once installed and activated in the origin location is used to create two files: 1) an archive file containing site data and the database and 2) 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 new location and the installer file is ran by accessing it via your browser. The installation will then 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. Duplicator will also provide a report on possible problems and point out a few other points to note, such as updating your permalinks and cleaning up temporary files.
All-in-One WP Migration plugin
Unlike Duplicator, the All-in-One WP Migration plugin is much easier to use. To use this plugin, you will need to first install a copy of WordPress in the target location and then install the plugin in both locations. The next step is to go to the “Export” section to download a file containing themes, plugins, uploads and the database. Then go to the “Import” section to import the file and save the permalinks to correct a known WordPress bug. The best thing about the plugin is that it 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, here is an article on how to increase the file limit without having to purchase the premium version of the plugin.
Manual process for migrating a WordPress site
While it is great to have the plugins do the work for us, it is essential to understand the manual process involved in moving a WordPress site from one location to another. For example, when I moved a site from a multisite WordPress installation to a single site installation, I couldn’t used the free versions of the plugins mentioned above to do the work for me. So knowing how to do it manually was absolutely essential. Manual WordPress site migration is a three-step process:
- Step 1: Install the latest version of the WordPress application on the target location.
- Step 2: Move all the files (themes, plugins, and uploads) to the target site using File Transfer Protocal (FTP) or via the cPanel.
- Step 3: 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 instead of FTP. Remember that if you do use this approach there is no need to activate the themes or the plugins since activation will occur once the database is moved. Also, if you take a peek in the Media library at this point you won’t see any files 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, for the last step of moving the database, you have the option of using a plugin such as WP Migrate DB plugin (free). For specific steps involved, please consult this article on database migration using WP Migrate DB plugin.