How to Migrate WordPress
The Easy Apps collection can install WordPress (and all other Easy Apps) into a subfolder but not into the root of your domain name. WordPress can be migrated to the root of the domain using the same steps you would need to migrate WordPress to another domain name hosted inside or outside of your server.
Please remember that this article assumes that you have basic knowledge of navigating the WordPress Dashboard and the IX Web Hosting control panel.
Utilities you will need
- You will need a program that allows you to find and replace text easily in your files. We recommend the programs Windows Grep or Notepad++ or something similar depending on your operating system.
- A compression utility tool that allows you to compress into a .gzip file. Our team recommends 7-Zip.
- An FTP-client, we recommend FileZilla and the FTP login information for your server.
- Access to your WordPress dashboard. This access to your control is usually accessible at HTTP://<domain.com>/wp-login.php.
Information needed inside your WordPress dashboard
The first steps to begin migrating your WordPress site to a different folder you will need to take the following steps inside your WordPress control panel.
- If your Permalinks settings are something other than “Default”, take note of this setting and change it to “Default”.
- Review the location and settings of any Widgets and custom menu buttons that are being used on your site. There are changes that are sometimes made during migration but with a clear understanding of their setup, it is easy to make quick corrections.
- Review your current WordPress Address (URL) and Site Address (URL) in the WordPress menu Settings/General Settings. Please copy and paste these to a text file allowing you copy and paste into your site again later.
Backup your WordPress directory folder
To migrate your WordPress site correctly, you will need to modify your WordPress files on using your local machine. We also recommend that you make a second backup copy to your system as a unified copy that you can restore to if needed.
- Log into your server using your FTP client and navigate to the folder directory above where your WordPress files are located.
- Save the entire folder that contains your WordPress files to your local computer.
- Save for the second time the entire folder containing your WordPress files to your local computer.
Exporting your Database in phpMyAdmin
Copying the files themselves is only of backing up your WordPress website. WordPress also uses MySQL databases. You will need to make changes inside your database as well as your files.
- Inside your my.ixwebhosting.com control panel log into your HSphere control panel.
- In Hsphere, launch phpMyAdmin from your IX Control panel using the MySQL database username setup during your WordPress installation. If you do not know your database username, it can be found inside your wp-config.php file.
- Once inside of phpMyAdmin, click on (or choose from a dropbox) the WordPress database name on the left side of the screen. Again, If you do not know your database username, it can be found inside your wp-config.php file.
- In the main window of phpMyAdmin, you should see a list of your database tables. WordPress database tables typically begin with the prefix “wp_”. If you do not see the “wp_,” you may have set up your site using a custom prefix during your installation.
- In the menu bar above the listed database tables click on the “Export” tab.
- Without changing any options, click on the “Go” icon on the bottom of the screen. Once you have clicked on the button, the database will begin to copy and request that you save the “.sql” extension file, automatically download the file to your computer, or open it in a new browser tab.
- Export for the second time your database to your local computer.
If you’ve made it this far, you have a truly FULL backup of your WordPress site. If anything ever happens to your WordPress site, you can use these files to overwrite and restore it to today’s exact settings and content.
Prepare your database backup for migration
Inside your “.sql” database backup information is contained that is specific to your old site URL. To replace this information search and replace the database file using a program like Windows Grep or open the file using any plain text editor. Do not use any Microsoft document program because it may alter the contents of the file. It is recommended that if you have to use a plain text editor use Notepad++ (a free program) or the developer favorite Adobe Dreamweaver. Windows Grep can process the database easier and faster since it doesn’t load the entire file into memory at one time.
Inside your program use the “Find and Replace”, or “Replace,” option in the menus.
- Search for your WordPress Address (URL) and replace it with your new WordPress address in your database.
- Search for your Site Address (URL) and replace it with your new site address in your database.
- After the find and replace is complete save your database renaming if that would be easier for your to distinguish from the second database back created.
Prepare your file backup for migration
Similar to have you searched and replaced your database backup, you have to search and replace your WordPress Address (URL) and your Site Address (URL) inside your file backup. Windows Grep, Notepad++ or Adobe DreamWeaver all have the ability to find and replace a directory at a time.
- Search for your WordPress Address (URL) and replace it with your new WordPress address in your WordPress files.
- Search for your Site Address (URL) and replace it with your new site address in your WordPress files.
Create a new database for the new location(s)
- After launching your hosting control panel click on the square icon labeled MySQL Server.
- Inside the MySQL server section of your control panel click on the icon labeled “Add” to create a new database.
- In the MySQL Management window, create a name for your database.
- Inside the MySQL Management window, you have the ability to add a database description. This option is not required but if highly recommended if you are going to work with several different databases within your account.
- After you have entered your database name and database description, click on the “Next” icon.
- The second step in creating your database to add a user that can access your new database.
- After you have entered your selected username and created a password that allows your user to access the database itself.
- Once you have created your password and added it to the window, enter the password once again to confirm the window.
- After you have added your username and password, the next step is to setup the user role. For WordPress sites, your user will need “DBA” access.
- After you have verified and entered all of the new information make sure to click ”Add User” to save the username and setup the ability for it to edit the database.
- Finally, after you have added the user click the “Finish” icon to complete the creation of your database.
- Once you have clicked on the “Finish” icon you screen will be redirected back to the MySQL Server page which will display your newly created database in your account.
- After creating the new database write down the Database Host, Database Name, Database Username, and database Password. This information will be used later to set up your new WordPress site.
Updating your wp-config.php file is not necessary if you intend on re-purposing the old database that was used before but is required if you are changing hosting accounts, changing hosting providers, or planning to maintain the previous WordPress location active.
- In the root area of the WordPress folder that you updated the WordPress Address (URL) look for the file “wp-config.php.”
- After you have found the “wp-config.php,” open it in your plain-text editor.
- With the file open, update the Database Host, Database Name, Database Username, and database Password. This information will be the information you wrote down earlier when you created the empty database.
Compress your modified database file
PhpMyAdmin will export large database files, but due to the load importing a large on the server a file can generate, phpMyAdmin is limited to only import a file as large as 2MB. This means that the file you just modified may be too large for phpMyAdmin to accept. The GOOD news is that phpMyAdmin will allow archived files.
Using the compression utility of your choice, create an archive out of the database file you just finished modifying and choose GZIP as the format.
Please note that some versions of phpMyAdmin do accept ZIP (.zip) files, but all versions take the GZIP (.gz) file format.
Ready to migrate
You now have a copy of WordPress ready to be uploaded to your new blog location. Because you have a full backup of your database and files, you do not need to install a fresh WordPress install, simply place the modified files on the server.
- Use your FTP-client to log onto your server and upload your modified WordPress files to the directory to its new home directory.
- Use phpMyAdmin, go through the same steps you did to Export, but instead select your new user, and then click on the Import tab.
- If you receive the option to “continue on errors” inside the import page, make sure it is selected.
- Click on the Browse icon and locate your new GZIP file you created and click “go” to upload your new database.
After the FTP and phpMyAdmin uploads are complete you should have a fully migrated WordPress site. We recommend that you browse your new WordPress location checking for any error messages. If your site is not working or is not loading correctly continue with the following steps:
- Log into your new location’s Dashboard
- Check the General settings tab to make sure the Blog and Home locations are correct. If they are not correct you have had a mistake in your search and replace actions taken during the migration.
- Review your Permalinks settings and make sure they are set to Default.
After you have reviewed and made corrections, review your blog once again. If your site is still not working correctly, go back to your Dashboard again and review the following steps:
- Set your theme back to the default WordPress theme
- Disable all plugins. You should not have to uninstall your plugins, only deactivate them during your review.
After you have made, the changes review your blog once again. This time, it may work but not look like your finished site. To correct your follow the next steps:
- Re-enable custom or choice of theme.
- Re-activate your plugins one-by-one. After each plugin review your site for any issues caused by the plugin.
- Update your Permalinks back to your chosen style that was used before your began your migration.
If your WordPress site is STILL not working correctly… there may have been a problem with one of the steps above, or there could be factors outside of the normal. Our support team can review your site for issues but cannot promise they can correct it since WordPress is a 3rd party application.
Was this article helpful?