- Forums ›
- Software Programming Tutorials ›
- WordPress ›
- How to Migrate WP Website from Localhost to Live Hosting?
Tagged: how to migrate a wordpress site from localhost, how to migrate a wordpress site from one domain to another, how to migrate a wordpress site from one server to another, how to migrate a wordpress site to a new host, how to migrate a wordpress site to bluehost, how to migrate a wordpress site to godaddy
You have successfully designed and developed WordPress website on localhost (i.e XAMPP) and now you are willing to migrate your WordPress website to live server. This tutorial will guide you step by step how to migrate your WP website from localhost to live hosting server:
Setup FileZilla FTP Configurations
First thing you need to do is transfer your localhost WordPress website files to live hosting. FileZilla is a famous desktop software which you can use to transfer files from localhost to live server. Download FileZilla, install it and open it after installation.
Click “File” in top menu and click “Site Manager” in drop down list. A new popup Window will appear where you will see various buttons. Click “New Site” button and you will see something appeared in upper pane of tree list. Rename new site as per your choice and in the right pane you will see different fields which should be filled.
First tab in right pane is “General” and first field in it is “Host”. Enter your live server host name here, if you do not know about your FTP host name you can contact your hosting provider and they will let you know about it but most often it is http://ftp.domain.com. Leave next two fields as it is and third one is “Logon Type”, choose “Normal” option from drop down list. Enter FTP User and Password in the below fields and press connect button.
Transfer Files to Live Server
Most common it is “public_html” folder on live server where you usually place your website files. Once connected to live server, you will see various folders coming from live server in bottom right pane. Double click “public_html” folder and now select location in left pane where there are WordPress files on your computer.
Open that folder where you have all website files, select them all, right click and click Upload link in context menu.
In the mean time while files are uploading to live server, there are couple of more necessary steps which should be followed for successful migration. Go to http://www.your-domain.com/cpanel and enter user name and password. While in the CPANEL, you will see various sections and icons.
Go to Database section and click “MySQL Database Wizard”. On the next page, enter your desired name for database and click “Next Step” button. Now on next page enter desired username and password for your database and click “Create User Button”. On the next screen you will have complete information about your database name and user name for which you have recently created. You can keep this information for future use as well.
Export Localhost Database
It is now time to get a backup of your localhost database. Go to phpmyadmin part of local server, click on your database and in the right pane click export button. Once on the export page, press Go button and it will ask you to save desired file on your computer. Save file anywhere you want to and after it has been downloaded, open it in any code editor like Dreamweaver.
Now we need to replace all http://localhost/wpsite URLs with your live domain URL. Press CTRL+F (if you are using Dreamweaver), a new find screen will appear. In the Find Query text box enter http://localhost/wpsite and in the replace text part enter “http://www.yourdomain.com” and press replace all. Be sure to replace properly and press CTRL+S to save your edition.
Import Database on Live Server
Now come back to CPANEL of your live server. On the very first screen of CPANEL, find and click “phpmyadmin” and it will take you towards your already created database. Click on the database and press “Import” button. Now on next screen click on “Choose File” and choose that exported file which you have just saved on your computer. Once done, press Go button and with in few minutes you will see all of your tables are imported on your live server.
Change WP-CONFIG.PHP Settings
WP-CONFIG.PHP is the file where you usually place your database settings. Enter name of database, user name and password here which you had created above for your live server as well as you will need to put database hosting server information which is usually “localhost”. Save the file and upload it again via FileZilla to the target location.
Now browse your website, if you have followed instructions carefully, it should work like a charm.
The topic ‘How to Migrate WP Website from Localhost to Live Hosting?’ is closed to new replies.