WordPress is the most common content management system around today. There are millions of websites using this platform, and thousands more are being made every day. WordPress has made creating, running and managing a website extremely easy. When you’re moving a WordPress website, however, it is important to do it properly or you could experience downtime or even lose data. The following steps will make switching hosts for your WordPress site quick and easy.
The following steps will move your entire site including files, themes, content, comments, plugins and everything else you’ve created. It should be completely transparent to visitors to your site, and once completed, your site should function perfectly without any adjustments.
What You’ll Need
Before you get started, you’ll need to make sure you have a few things ready. Take a moment to double check to make sure the following things are available on your computer:
- Access to the phpMyAdmin account on your existing host (most likely through cPanel)
- An FTP program such as FileZilla.
- FTP access to your existing WordPress Site
- Access to the DNS & Name Servers settings where your domain name is registered.
- The information from your new hosting company including phpMyAdmin, FTP and Name Servers (this is typically all provided in a welcome email from the hosting company).
Step 1: Downloading Your Existing Site
The first thing you’re going to want to do is download your entire WordPress site. This includes all the files for your site, as well as the database(s). The following steps will walk you through how to safely download your existing site:
- Open your FTP program (FileZilla) and log in to your old web host. You should have your FTP username and password from when it was set up, otherwise you can create one from the cPanel or other management console (you can also contact your old host for support on how to get this information, if you can’t find it on your own):
- Find the folder on your web server than contains all the files and folders for your website. Drag them from the web server into a new folder on your local hard drive. Make sure you have sufficient drive space to complete the transfer before moving the site. Most sites aren’t too big, but it is important to have plenty of room.
- From the cPanel of your old host, access the phpMyAdmin screen. Generate a MySQL export and save it to your computer’s hard drive. Depending on the size of your WordPress site, this database could be fairly large so again, check to make sure you have sufficient disc space. Make sure to take note of the database name, as it will be used in the next step.
You now have your entire site downloaded to your computer. It is important to note that any comments made on your site from this point until you are live on your new host will be lost, so make sure you move quickly to reduce or eliminate any potential customer impact. Of course, if you make any posts to your site at this time, they will be lost as well, but that is typically not a concern unless you have other people publishing content to your site.
Step 2: Setting Up your Site on the New Host
It is now time to move all the files and databases from your computer onto the new web host. This process is fairly simple and basically just the opposite of the steps in the first section of this page.
- Connect to your new host using the FTP information provided when you registered. You will have to use the IP address rather than the domain name at this point because the domain name is still pointing to your old host. All the IP information you need should be in your welcome email from your new host. *If you weren’t provided with an FTP account at set up, connect to your cPanel and create one first, following the instructions within the cPanel.
- Once connected via FTP, transfer all the files (not the database) from your computer into the folder where you want your WordPress blog. This folder may be named Public_HTML if you only have one site on this host, and you plan on having your WordPress blog the only thing on the domain.
- From the cPanel, access phpMyAdmin again, only this time restore the database using the step by step instructions provided. The default settings should be fine. (If you need the database name or password, it can be found in the wp-config.php file, which will be in the main website folder on your computer and on the new web server).
Your site is now live on the new web host. If, however, someone visits your site, they will still be looking at the old host. This is because the DNS records of the Internet are directing traffic to that site. The next step is to get that updated so people will be routed to your new host.
Step 3: Update NameServers
Find out where your domain is registered, and log into your account there (this could be somewhere like goDaddy or NamesCheap or any other domain registrar). Once logged in, locate the settings for the names servers for your site. If you can’t find them, contact customer support or do a simple search on their site. Once located, you simply want to change the name servers to the ones provided by your new host. Typically there will be two name servers, and they will be something like NS1.newhostcompany.com and NS2.newhostcompany.com. Enter them in, and hit save.
Once you hit save, the domain registrar has to update the DNS records, which can take some time. In most cases, everything will be updated within a couple hours. It can, however, take up to 48 hours for this to be completed. To be safe, don’t cancel your old web hosting account for at least three days after you’ve changed your name servers.