How To Properly Move WordPress To New Host In Few Minutes
Almost 30% of the internet is based on WordPress. Learning about moving WordPress to a new host can have some risks like data loss or downtime. Both of these issues can make your website temporarily unavailable to your users or search engines. It can result in potential customer or business loss. Therefore, here at TemplateToaster, WordPress theme builder blog, I will walk you through the process of moving your site to a new host, step-by-step, to avoid any kind of risk. This article is a step by step tutorial to help you migrate your WordPress site safely to a new host in minutes.
Before we get moving with migration, we want to let you know that a lot of WordPress hosting companies offer a free migration service. Confirm with your hosting company if they offer migration or charge a fee. Having said that, let’s take a look at the steps we need to perform in order to properly move WordPress website to a new host in few minutes. We will use
How To Move WordPress To New Host In few Minutes
- Choose a new WordPress Hosting
- Backup and Transfer your website files
- Export the WordPress database
- Create a new WordPress database on your new Host
- Edit your wp-config files if needed
- Import your MySQL database on your new host
- Migrate your backed up data on your new host
- Update your DNS and name servers
Ready? Let’s get started.
Moving WordPress to a New Host in few simple Steps
Step 1: Choose a new WordPress
Are you stuck with a slow web host? Have you tried everything to optimize your WordPress Speed but all in vain? Then it’s time for you to move your WordPress site to a new and better host that can handle your growing traffic. You must have realized the importance of having an adequate web hosting service, so choose carefully this time. Here’s the best WordPress Hosting Providers that we recommend.
- If you are running a WordPress based site, we recommend you to choose Bluehost as it is the only web hosting company officially recommended by WordPress.org itself.
- Get SiteGround for exceptional support for WordPress, Joomla, and Magento with its open source support approach.
Step 2: Backup and Transfer your website files
Now that you are sure about your new host, the next step is to back up every aspect of your site. It is a good practice to try your best to prevent any data loss. However, it is also a requirement of migrating your WordPress installation. There are various plugins available that will completely backup your site. However, you need to have a manual approach. You can use an FTP program to download and upload files.
This also includes the .htaccess file that is set to be hidden. You can consult your FTP program’s help to have it display hidden files. Downloading could take some time, depending on the number of media uploads you have in your site. While this is still underway, we can move forward to the next step.
Step 3: Export the WordPress database
Next step is to Export the WordPress database. It is a simple process that requires you to perform a few steps only. First, log into your cPanel account on your web server and open the phpMyAdmin application. Then, select the database having your WordPress installation from the list on the left hand sidebar. Lastly, click on the Export tab from the navigation menu. The default settings of Quick export and SQL format offered by the application is sufficient. Therefore, just click on the Go button and the database export process will start and it will download a file onto your machine. Once the FTP transfer and database export is completed, you can move to the next step.
Step 4: Create WordPress database on your new Host server
Before you start moving your site to the new host, you need to create an environment for a WordPress installation. In order to do that, create a database that you can import your SQL data into. First, Log into your new web host using your credentials and connect to the cPanel. For easy understanding, we’ll be using the MySQL database application. Follow the given instructions:
- Open mySQL database and create a new database with your website name.
- Then, generate a new MySQL user with a secure password
- Lastly, add this user account to the new database and grant it All Privileges.
Don’t forget to write down the database name, your new MySQL username, and password.
Step 5: Edit your wp-config files to prevent downtime
Wp-config file controls the access between WordPress and your database. Now, browse to the folder on your computer where you downloaded your website files to. You need to make a copy of your wp-config.php file and store it in some other folder on your machine. It is basically a backup in case something goes wrong. Now, open the original version of file on your text editor and make the following changes:
- Change the name of Database
Find following section and change db_name or your new database name: define(‘DB_NAME’, ‘db_name’);
- Change the username of your Database
Find following section and change db_user or your new database user: define(‘DB_USER’, ‘db_user’);
- Change the user password of your Database
Find following section and change db_password or your new database password: define(‘DB_PASSWORD’, ‘db_pass’);
After completing these steps successfully, save wp-config.php and close the file. Your config.php should look like following screenshot.
Step 6: Import your MySQL database on your new host
Now that you created a new database to work with, you have the right environment to start the import process. First, open phpMyAdmin from cPanel on your new server and fetch your new database from the list displayed on the left hand sidebar. Once it opens, click on the Import tab of the navigation menu. Then proceed to File> Import check box, and set the format to SQL and then click the Go button. The database import will start. It can take time depending upon the size of your database. Once it is finished, you will get a notification informing you of a successful import.
Step 7: Migrate your backed up data on your new host
Now that you have your database ready and wp-config.php file reconfigured, it’s time to begin uploading your website’s files on your new host. Use FTP to connect to your new web host and browse to the folder, where you placed your website’s files. Upload the files to the public_html folder.
You can upload your website files that now include updated versions of wp-config.php files by selecting the remote directory. However, don’t delete these files from your machine yet, they are still needed until the completion of final steps.
Step 8: Update your DNS
At this point, you’ve successfully created a copy of your WordPress database and files on your new hosting server, however, your domain still redirects to your old web hosting account. You need to switch your DNS nameservers to this new IP. It will make sure that your users are taken to the new location of your website when they enter your address in their browser. We’ll guide you step-by-step to show how you can change DNS nameservers with GoDaddy. Depending upon your new web host, it can be slightly different, however, the basic concept is almost the same.
- Log into your GoDaddy account and then click on Domains. Then, click on the Manage button placed right next to the name you want to change.
- Then, you will find Manage DNS under the Additional Settings section. Click on it.
- Next, scroll down to the nameservers section on the dropdown menu and click on the change button.
- Then change your nameserver type from default to Custom. And then, fill the new hosting provider’s information under Nameservers and click on the Save button to store your changes.
Since, you have the same content on your old host and the new host, your users wouldn’t notice any changes except for the better performance and faster loading time. You may also read about what is a domain name and move WordPress site to new domain.
Moving WordPress to a new host (Frequently Asked Questions)
Q1: Why do I need to transfer my WordPress site to a new host?
If you’ve tried everything from keeping your site from going slow using CDN services, however, it’s still not offering an optimized speed, then, it could be your web hosting provider. In this case, upgrading to a new plan or changing the web hosting company can be the solution.
Q2: Can I have domain name and web hosting services from two different companies?
Yes, you can absolutely have name and web hosting services from two different companies, like hosting from BlueHost and domain from Godaddy. Domain and hosting are two completely different services, but often leave users confused because most of hosting companies offer both of these services.
Q3: Can my users tell that I transferred my WordPress site onto a new web hosting company?
Not really, as the content of your website will remain the same. However, the only difference they are going to tell is the faster loading speed and better overall performance of your website.
Q4: Do I need to delete files from the old host?
Yes, we recommend to delete your files from your old host before you cancel your account. However, keep your old account for at least a week after the migration because they delete your data immediately after your cancellation. And in that case you won’t be able to retrieve your data in case of data loss.
Q5: How long will it take for DNS changes to fully propagate?
It is almost immediate but can take about 48 hours to DNS changes to fully propagate. It is best to migrate your website at a period when you expect lower levels of traffic. You need to avoid making any changes to your website as you may be making changes in the old version of the site during this DNS propagation window.
Related reading: WordPress 101 tutorial
Build a Stunning Website in Minutes with TemplateToaster Website BuilderCreate Your Own Website Now