When you first launch and publish your WordPress site, you’re not likely to think you will ever need to move the site to a new host. Over time, though, you might find that not all hosts are created equal — especially as your site grows in popularity and attracts more and more visitors.
Like many WordPress site owners, you might start out by hosting your site in a shared environment with basic resources. However, when your site becomes more popular (maybe you published a buzzworthy article, which was shared throughout social media, driving thousands of simultaneous readers to your site — good job!), you may need to migrate to a host or hosting plan with more power.
How to migrate a WordPress site to GoDaddy Managed WordPress
If you use GoDaddy Managed WordPress, you’ve got access to a nifty migration tool at no cost.
Note: If you have a WordPress.com site, the GoDaddy Managed WordPress migration tool won’t work for you. To use their migration tool, you’ll need full administrative access to your current hosting account (FTP and database) and full access to WordPress Admin.
1. After purchasing GoDaddy Managed WordPress, click Set Up.
2. Select Migrate Your Existing WordPress Site.
GoDaddy will migrate the site to a temporary URL that can be updated later to the final domain.
3. Fill in the WordPress Administrator and FTP Credentials, and click Finish.
The migrated site files and the database are available at the Temporary URL.
Understanding WordPress migration
The key to successful migrations is understanding WordPress. There are distinct settings and locations to the site configuration, theme configuration, plugin configurations and uploaded files and content.
wp-config.php — In the root directory of the WordPress installation, the wp-config.php contains the login credentials to the database and, depending on the installation, might also have the domain information hard-coded.
wp-content — This directory contains subdirectories utilized for themes, plugins and uploaded assets like images.
MySQL — The wp_options folder (the site may replace the “wp” with another table naming convention), has key information like the administrative user, site URL, and administrative URL. If the administrator is unable to login because of an incorrect email address, a user can update the administrator’s email address via the database.
Hosting companies typically provide MySQL tools (PHPMyAdmin) to query and update tables. Updating the administrator’s email address (admin_email) will allow you to utilize that email address and the password reminder to reset your administrative password. If the site continues to redirect to the wrong URL for logging in or loops continuously, you can update the home URL (home) and site URL (siteurl).
WordPress Import Tool
WordPress provides an export and import tool, but it’s not helpful for migrating WordPress sites from one host to another. The tool is limited to exporting and importing posts, pages, comments, custom fields, categories, and tags via an XML file.
While that might sound comprehensive, there are some critical elements that are not included that ensure the proper migration of WordPress.
- Navigation menus and assignments
- Themes and theme settings
- Plugins and plugin settings
- WordPress site configuration and settings
- File transfers often fail in the migration process
Some third-party plugins allow exporting of options via the WordPress export and import tools, but they’re still not comprehensive. Users who wish to migrate WordPress from one host to another should avoid this method.
If you’re not familiar with file transfers, exporting or importing MySQL databases and editing PHP files, you might consider hiring a pro who specializes in WordPress and has experience in migrating sites.
If hiring a consultant is not an option, the other alternative is to utilize a third-party application.
Another service that works well is BlogVault. Primarily a backup and security service, BlogVault offers a migration tool as well. Install their plugin on the active WordPress site, enter the credentials for the destination site, and the BlogVault service does the rest.
Another well-known service dedicated to CMS migration and conversion is CMS2CMS. Be sure to read through the options for migration carefully and ask for assistance with the WordPress-to-WordPress migration service offering to ensure the site will work properly.
Manual WordPress migration
Advanced users who still wish to migrate WordPress without the use of migration tools must follow these steps:
1. Update all plugins, themes and WordPress to the latest versions.
2. Disable any caching or security plugins.
4. Export the WordPress MySQL database.
Enable option Add IF NOT EXISTS and Complete Inserts. Disable AUTO_INCREMENT to ensure you do not destroy relationships between tables.
5. Choose a zipped file or SQL contents.
Choosing a zipped file will initiate a download of the database to the local drive. If a zipped file was not selected, copy and paste the contents of the SQL into a text file and save it locally.
6. Create a database on the new server and import the SQL.
Note: If the SQL text file size exceeds the maximum size limitation on the server, you can use a desktop client. MySQL has a free tool, MySQL Workbench [http://www.mysql.com/products/workbench/], that will allow a connection to the database and imports without file size limitations. If the SQL file has a CREATE DATABASE command, remove it since the database is already created.
7. Upload all files to the new host.
Update the database credentials with the credentials from the new host.
// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define( 'DB_NAME', 'database_name_here' ); /** MySQL database username */ define( 'DB_USER', 'username_here' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password_here' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );
9. Update DNS settings and modify the A or CNAME records from the previous host to the new host settings.
Depending on the service, this may take a few seconds or up to 48 hours.
10. Test logging into WordPress.
When changing hosts, the encryption utilized may render all user passwords unusable. Have each user utilize the Forgot Password tool to reset their passwords and update them.
11. Within the WordPress Administration, navigate to Settings > Permalinks to refresh the permalink cache.
If you skip this step, internal pages might be unavailable since the querystrings cannot be navigated.
12. Enable Caching and Security Plugins.
13. Test the site.
WordPress migration to a new domain
If the new host is also a new domain or subdomain, you’ll need to take additional steps to update the site:
14. Update wp-config.php home and site URL settings.
By hard-coding these settings, the settings within the wp_options table are ignored, and the site will be properly displayed at the new domain.
define( 'WP_SITEURL', 'http://newdomain.com/' );
define( 'WP_HOME', 'http://newdomain.com/wordpress' );
15. Utilize a Search and Replace plugin.
This plugin will update all internal links in any of the WordPress database tables. Be very careful with this as you might destroy your data and have to truncate the database and re-import your data over.