
PTC for Software: Premium AI Translation, Consistent Across Your Website and Product
Do you develop software or mobile apps alongside your WordPress site? PTC, WPML’s AI translation engine, now translates them too.
The WordPress Codex is a great resource of information but can be a bit overwhelming for some users looking to migrate to a new hosting provider or change domain names.
We created a printable checklist to help with migration. We also covered the issue of SEO and what to do in case things go wrong.
Do not turn off the account for the old hosting provider yet. Leave it active for at least a week in order to give DNS time to resolve and for you to verify files and database.
You should have already prepped other items such as moving email accounts and setting up an account at the new hosting provider and/or decisions about the new domain name with nameserver settings, if applicable. Note: some back up methods explained in this article will also back up your email accounts.
Ask Your New Host
First, ask your new web host if they provide services to move from your old host. Most provide this service at no cost depending on the server set up.
Using a Plugin: Duplicator
Duplicator allows you to backup and reinstall the database and WordPress files either for safe keeping or to a new hosting provider. It’s a free plugin with the ability to upgrade to pro for larger websites.
The Easy Way: CPanel
Cpanel has built in features for backing up databases and files. It’s even easier if migrating from Cpanel host to another Cpanel host.
Option 1: Cpanel to Another Control Panel
Option 2: Cpanel + File Manager + PHPMyAdmin
Option 3: Cpanel to Cpanel
The Manual Way: FTP
File transfer through FTP is the slowest but sometimes the above options don’t work out. Two popular FTP programs are FileZilla and CuteFTP among others. You will only need to worry about files within the /www/ or /public_html/ folder.
Using a Plugin: Go Live Update URLs
Go Live Update URLs is a simple find/replace plugin to change the URL in the database.
Find and replace the full URL with http and without the ending foward slash “/”:
http://example.com
The Easy Way: wp-config.phpNote: this option won’t work for mulitsites.
Go to Settings > General and change the URL in WordPress Address (URL) and Site Address (URL). Save changes.
In wp-config.php, add the following lines at the top:
define('WP_HOME’,’http://example.com’);
define('WP_SITEURL’,’http://example.com’);
The Manual Way: DatabaseIf all else fails, you can make the replacement in the database.
Another way is to update functions.php with:
update_option('siteurl’,’http://example.com’);
update_option('home’,’http://example.com’);
I accidentally changed the nameservers on my domain before files were downloaded. Connect to the server’s IP address or temporarily change the nameservers back. The IP address can be located in the email the hosting company initially sent or you can send an email to tech support. You can either connect via FTP to the IP address or if using Cpanel, visit http://[IP-HERE]/cpanel. So for instance, if I was connecting to IP 127.0.0.1 then the URL to get to Cpanel would be http://127.0.0.1/cpanel. From there just login with the same credentials.
Pages return a 404.
Check the URL was successfully replaced in the database. Resave permalinks in WordPress backend.
Homepage menu link returns a 404.
Go to Appearance > Menus and see if the home link needs to be changed.
Can’t write or add images to the uploads folder. Change permissions to the wp-content/uploads folder to 755. If that doesn’t work, try 777. And if those permissions don’t work contact your new hosting provider.
If all else fails. Make a copy of the yourfiles_backup.zip backup and unzip the files. Restore the files & database and re-follow steps above. Pay special attention to the URL change and make sure all files and database information have successfully imported.
301 Redirects
While your old domain is still active, you can forward the old domain to the new domain by setting up a 301 permanent redirect to the new URL. Add the following to .htaccess for the old domain. Replace newwebsite.com with your new URL:
Redirect 301 / http://www.newwebsite.com/
If moving from a sub-directory it would be:
Redirect 301 /subdirectory/ http://www.newwebsite.com/
You can test if these changes took place by visiting the domain name in a new browser after saving .htaccess.
Further reading: How do I redirect my site using a .htaccess file?
Notify Google & Bing
Next, notify Google and Bing Webmaster Tools of the domain name change.
Resubmit Sitemaps
Notify Google and Bing of sitemap changes.
Notify Users
Alert site users via a newsletter and social media of the new domain name.
Monitor Dead Links & 404 Errors
Keep an eye on any dead links via a 404 plugin. For single pages, you can use a 301 redirect plugin and you can create a custom 404 page.
Follow WPML on Twitter, like on Facebook or get updates via RSS.
If you have feedback about this article or have ideas for future topics contact me via Twitter or leave your thoughts & feedback in the comments below.