I have taken care of a lot of WordPress site migrations or movals over the years. A WordPress Site Migration is therefore nothing new to me. People move their website because they get more traffic, need more flexibility or because they are unhappy with their hosting provider. Or all of the above of course. I thought it would be interesting to tell the story of one of the latest ones as a case study. I recently took care of migration of the Bakfiets en Meer WordPress website. Let me tell you how such a migration or moval takes place. You will see it does not have to be a scary of frustrating thing like the folks in the image seems to have deal with.
Client Case – Bakfiets en Meer Cycling Blog
Bakfiets en Meer is a blog run by Henry Cutler, the owner of WorkCycles. He mainly writes about City Cycling, Amsterdam and WorkCycles or other bikes. Alle the things he is passionate about. It had been running pretty well the last couple of years with Webreus.nl in the Netherlands and had been getting a decent amount of traffic too. Many people love reading Henry’s personal blogs on cargo bikes or bakfietsen and everything surrounding it.
Reasons for Migration
For the last couple of months we have been having too many server issues. This due to issues with traffic and attacks on the shared server . But also due to issues with the site being to big for the package we were paying for. We wound up having not enough space to add more files and uploading even caused certain files to disappear on us on an attempt to overwrite them as we were already over our limit! And when we realized the Antagonist (Dutch hoster) offered a better and cheaper package including great service we decided to move the site.
Preparation
First we made a backup of all the files and the database. This can be done with a plugin like Backup Buddy which is one of our favorite tools for backing up and migrating sites. However my partner Doede and I decided to do it all the old fashioned way this time using PHPMyAdmin and FTP.
When you do backup with FTP do make sure that all files are backed up and uploaded to the new location. Sometimes some files do not come along the first time around. We highly recommend the open source FTP program Filezilla to do all the heavy lifting.
As for PHPMyAdmin, well most hosters have it installed for you and is basically a GUI to manipulate your database:import data, export data, remove data, add tables, optimize data and so on. Normally the hoster allows you to access it from their control panel. This is the case in CPanel and Plesk as it is in most control panels.
Files and Database Migration
Once you have all the files on your PC you can start moving them to the new server. If the domain name has not been migrated yet, and as we of course want the site to work before we do that is the case, you need to upload all the files and import the database. Uploading via FTP can be done using the username and password and ip address you have been given by the hoster. this way you can still upload without having the option to use the domain name.
NB If you do change domain names there will be database changes that need to be made as well as possible .htaccess changes. For database changes in case you moved without using a plugin like BackupBuddy, use Search and Replace by Interconnect/it
Local Testing
If the moval is not too complicated you can do it all on the remote server or final destination. But if more work is to be done it is always quicker to work locally. This can be done using a VirtualBox with Vagrant or a Trellis package or using more automated packages such MAMP or WAMP . There is of course DIY using the built in tools on your box. I find Trellis to work well.
In this case a direct migration to the new server was an OK option so we went for that. This as nothing changed, but the hoster. No domain name changes, no webserver or database changes. Just a bare bone migration.
Remote Testing
Most hosters offer an option to test the site before you migrate the domain. Sometimes it means changing the Hosts file on your own PC or Mac to access it via IP.
Hosters File Change
For unix systems like my Mac the file is under /etc/hosts. For Windows 7+ is is under %systemroot%\system32\drivers\etc\ . See Helpdeskgeek article on Windows hosts file. In the past moving the same site from Villa to Webreus I had to use this trick by adding the new ip with domain name to this hosts file:
xxx.xxx.xxx.xxx bakfiets-en-meer.nl www.bakfiets-en-meer.nl
Domain name x-ed out here for security reasons.
This will load the site from the new location using the domain. And this will then of course only be the case for you. If your client wants to see changes this way as well you will have to ask him to make the same changes on his computer.
Once you have moved the actual domain you can comment out the line or remove it.
Site Testing Service
Sometimes the hoster has a domain service for it. The Antagonist does. Using their alvast online (online beforehand) service you can preview the site before you move the domain. And then you do not need to use the above mentioned trick, which is a nice service on the part of the hoster!
It is really vital to test using the domain on the final destination, especially when you have to make database changes due to domain name changes. Then you can test whether all pages and posts load well after you saved or made the new changes
Maintenance Mode
Also when you do do all the testing online, do remember all can access the site unless you use maintenance mode to give only a limited amount of people access.
Domain Name Migration
To move the domain to the new hoster, which we wanted in this case, you need the authorization token or epp code ( transfer secret) from the old hoster to authorize the new hoster’s DNS server to take over this responsibility. This is at least the case for most TLDs. See this extensive NameCheap article What is an Auth/EPP code? for more information on epp. I quote:
You’ll need an Auth Code to transfer a domain from one registrar to another. Specifically, Auth/EPP codes are required for .com, .net, .org, .us, .biz, .info, .me, .co, .io, .ca, .tv, .in, .mobi, .cc, .pe, .com.pe, .net.pe, .org.pe, and.tech domain transfers.
NB For Dutch .nl domains you need the authorization code or verhuistoken too. See SIDN article Domeinnaam verhuizen
DNS Propagation
Once we had taken care of this all we only had to wait a little while for the domain name transfer to propagate. That means it takes time before all or most domain name servers or DNS servers worldwide know about the moval of the site. So some servers might send visitors to the old server or old site location. This can take up to 24 hours, but in most cases it is a done deal within 4-6 hrs.
WordPress Site Migration : Finito!
So there you have it, a standard WordPress Site Migration taken care off. As you can see not too hard. But if you do run into issues, as we did as you can see in the following chapter, and you cannot solve them, do not hesitate to contact me!
Issues
Most migrations have some issues:
- sometimes there are small problems due to domain name changes,
- or hosting size constraints,
- sometimes the database import is tough due to table size or database size ,
- PHP or MySQL version changes and causes issues,
- Moval to new web server with different configuration rules like an Apache > NGINX switch
- and sometimes the character settings of the server are different.
The main issues we had in during this WordPress Site Migration case was access issues to both core accounts for domain transfer and the display of Flickr photos in the sidebar.
Domain Transfer issues
The new hosting account was set up quickly, but the project delayed and email with access details to Antagonist core account not sent through properly. The other issue was access to the old hoster’s account. These issues caused a delay as we could not pass on the authorization code. That is why it is always important to keep a project up and running and avoid delays as much as possible. But well, sometimes they cannot be avoided.
Flickr Widget Issues
Quick Flickr Widget was no longer working so moved onto Slickr Flickr and needed the ID of my client’s Flickr account, which I was able to get at IDgettr . Do display more than 20 images you need an API key was well though so I got that through his account as well. Finally there were display issues as the flickr gallery widget did not display the images as they had been before. So had to add some CSS voodoo as well.
However, due to the limited functionality display wise of the plugins and Flickr plugins in general out there we decided to leave it out for now. Just could not display images of a decent size, all cropped to the same dimensions opening the photo in a new tab at Flickr when clicked on.
What we did in the end was adding a catchy title followed by the Flickr log. On clicking the logo you will go to the client’s Flickr page to see more great bike stuff!
[gravityform id=”9″ title=”true” description=”true”]