Step By Step Guide To Move A Site From WAMP Server To Live Server.
January 23rd, 2017 | by Ravi Chahar || 4 Comments |
For developers, it’s quite a common thing to run an offline website to test new products.
If you’re running an offline website on the WAMP server then you must know that you can test WordPress themes and plugins before using online.
People are smart enough to secure their online website.
Many plugins are poorly coded which break your website so it’s always recommended to test on an offline server.
Many people install WordPress on XAMPP server.
You should also know that you can also install XAMPP on a USB drive. But for MAC OS, WAMP is one of the best softwares to create the local server.
Many Windows users also install WordPress on WAMP server.
In this tutorial, you will learn to move a site from WAMP server to live server.
What Are The Things Required To Migrate An Offline Site To Online Server?
As you all know, for a WordPress website, you should have a domain name and a reliable web hosting like Inmotionhosting, Bluehost.
And if you want a managed web hosting then WP Engine is the best.
Before you start anything, you should backup your website and the database.
Let me start it.
Step 1:- Export The Database From WAMP.
From the offline server, you have to export the database. It will get transferred to the online server later.
Just open the phpMyAdmin panel and choose the database you want to export.
NOTE: You have to use the custom method and uncheck the extra tables created by the plugins you have tested.
Select the ZIPPED file and download the database.
Now you have the backup of your offline database to your computer.
Step 2:- Transfer Website Data.
In the “C” drive of your computer or any drive where you have installed WAMP, you will find the WAMP folder.
Search for “WWW” folder and then “WordPress” folder. If you have changed the name of the folder then search for that.
Now there are two options, whether you use the FTP or directly upload all the files and folder to the live server.
Just compress all the files and upload that file to the WordPress root directory after.
Go to cPanel>>file manager>>root directory. Extract that file and you’re done.
Whole data of your website has been moved from WAMP server to the live server.
Step 3:- Create A New Database On the Online Server.
You have downloaded the backup of your offline database in the first step. Now is the time to generate the space for that.
Create a database using MySQL Databases option.
Fill all the details of the new database, the name, username. Grant all the permissions to this user.
Make sure that you remember the name of the database.
Step 4:- Upload The Database To This New Database.
Now is the time to upload your offline database to the new database you have created.
Go to phpMyAdmin, select the name of the database from the left-side menu and click on the “Import” button from the main menu.
You should know the proper way to import MySQL database. Choose the database file from your computer and upload it.
If the size of the file is bigger then you have to increase file upload size limit in WordPress.
Step 5:- Edit The wp-config.php file.
You should know that the credentials of your offline database don’t match with the database you have just created.
If you try to open your website, you will get “Error establishing a database connection“.
So you have to edit the wp-config.php file. Match the database name, username to the new database of your online server.
Step 6:- Change The Site URL.
Your old site URL, home URL won’t work because now the original site URL is the URL of your online website.
You can change WordPress site URL using the database.
Open the new database and go to wp_options table row.
It will consist many options from which, you have to find the site URL option. If you can’t find on the first page then use the pagination and open next page.
NOTE: If you have changed the table prefix of your database then instead of “wp” you will find that prefix in all the tables of the database.
Fill the site URL and the home URL and save the file.
Step 7:- Change The Image Links.
If you face the broken links for all the images then you have to fix this by adding a line in the database.
Go to phpMyAdmin, choose the database and click on the “SQL”.
Place the code and save the file.
You can easily fix the broken image links by changing the location of the links from an offline server to online.
Step 8:- Check WordPress Settings.
Apart from the database, you should fill all the necessary WordPress settings.
You should know that site URL is also filled in the WordPress dashboard.
To make sure that all the links for the post are working good, you should use the proper permalink structure.
After all the proper settings, open your website and you’re on.
You have successfully done your job. To move a site from WAMP server to live server, you just follow the guide.
I Hope Now You Can Easily Move A Site From WAMP Server To Live Server?
Just a couple of days ago, someone asked whether it’s possible to accomplish this task or not?
Well, here is the answer. The step by step guide can provide you the same website as you were running on the local server.
As I have mentioned above, there are some crucial points to remember.
Matching the credentials of the database with the wp-config.php file and changing the URL is really important.
And if you want to keep the size of the database small then no need to copy the tables which were generated by the plugins. Just use the WordPress tables.
I hope now you can move a site from WAMP server to live server with no conflict.
If you still face any problem, feel free to ask.
You can also connect with us on Twitter, LinkedIn, and Facebook.
Very clear instructions – but for non-technical readers like me, perhaps a little introduction with more explanation of what WAMP is would be helpful – please?
Joy – Blogging After Dark
There is a separate post for WAMP and WordPress installation. It would be so lengthy if I started to explain all about WAMP in this post. You can find the article here only. Just search for WAMP.
Hope you will find your answers.
Have a great day.
Hey Ravi Sir,
Moving a site from wamp server to live server is the question which every newbie wanna know I am damn sure they have got their answer 🙂
It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between superb usability and appearance. I must say you’ve done an amazing job with this. Additionally, the blog loads extremely fast for me on Chrome.
Whenever you decide you bring your offline website to the online server, you would always need a guide like this. Many people are using WAMP in Windows and it’s important to take a step further.
You would be amazed to know that the secret behind this fast loading blog is its theme.
It’s a self-developed custom WordPress theme.
Have a great day.