This tutorial to help you getting your localhost running wordpress to run on live server (internet).
Export Local Database
Login to your local phpMyAdmin, select the database from the dropdown. Click on the Export tab:
- Under the Export field, make sure all tables are selected
- Under the Structure field, tick “Add DROP TABLE / DROP VIEW”
- Tick “Save as File”
- Then click Go and it will prompt you to download a SQL file
Find & Replace All Local URLs
Open the database SQL file with a text editor. Find and replace all local URLs with your domain URL (eg. replace all “http://localhost:8888/mysite” with “http://www.yourdomain.com“)
Import The Database
Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go
Upload the entire WordPress folder to your server.
Change The wp-config.php Setting
On your server, open the wp-config.php file. Change the database details to reflect your server settings.
If your .sql file is large, you can try the upload but you may get timeout errors. This is NOT the fault of WordPress – it is a host setting. If you have your own server you can change the settings. If you cannot alter that, and you get timeouts, you will have to do the following;
- Open the .sql file in a text editor. Do NOT use a word-processor, or Dreamweaver or GoLive unless you REALLY know what you are doing – on a Windows machine WordPad is okay.
- You will see something similar to this at the top:
— phpMyAdmin SQL Dump
— version 2.6.1-pl2
— Host: localhost
— Generation Time: Jun 24, 2005 at 05:14 PM
— Server version: 4.0.24
— PHP Version: 4.3.11
— Database: `tamba2_data`
CREATE DATABASE `tamba2_data`;
Ignore all that. You do not need it.
- Everything else in that file needs copying and pasting into the SQL window. You highlight some text, copy it, paste it into the SQL window, click Go and after the Success message, you do it again with the next chunk of text.
- It can take a while, and you need to be careful that you miss no lines out.
Good Luck..!! 😀
Oh.. and another one, if you use friendly URL (permalink), make sure to change .htaccess (click to see the tutorial)