I am developing a wordpress site. I uploaded the files(wordpress) to my live host. So my new live url site for my wordpress like this sample url http://mywordpress.com/, the display seems to be fine, but when I start browsing the menus page will be redirected to my local server, instead of http://mywordpress.com/about-us/ it went to my localhost like http://localhost/mywordpress/about-us
So when I checked the page source all the links including the stylesheet is link to my local. even though I use this code
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" media="all" />
Its kinda weird... but anyone knows how to configure this?
The reason behind this, After you move wordpress site from local server to live you not changed the site url and home address.So, when ever you try to open your site in real server it will redirect back to your local server.You need to open PhpMyAdmin Tool in Cpanel or FTP and select your database then open wp_options table.
In wp_options table change the value of site url and home.
Now your problem will solved.
It sounds to me like your database may be using old values for your url's.
For a quick solution that may or may not solve your issue, try http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/ . It's a great plugin. If not... here are my bullet proof instructions for transferring from local to online.
I've migrated from local to online hundreds of times and I think most tutorials on wordpress migration are overly complex. Here's my method (assuming you already have a fresh wordpress installation and database)
Go to phpMyAdmin for your local server and export your database (but not as a file)... just get the straight SQL text and copy it.
Paste that code into dreamweaver, text editor, coda or any plaintext word processor that can do a search and replace. Then search for "http://MyOldWordpressUrl.com/wordpress" (make sure there is NO slash after the final directory) and replace with "http://MyNewWordpressUrl.com/wordpress". Obviously don't include the quotation marks. Make sure your old wordpress URL is correct. You can double check in admin -> general settings.
Get into your control panel for your online hosting and go to the database for your new wordpress install (this should be a brand new installation where you haven't yet created any posts or input any data-- just what wordpress gives you). Export the database and save it as a file (just in case). Now drop all the tables. Click YES when it asks you if you're sure. Then click on the SQL icon (should be in the upper left hand corner of the left sidebar). This should open a new window. Now paste in your code from step 2 and click GO.
Transfer your theme folder via FTP.
Right now you should go to the new wordpress install's wp-admin. Your same User Name and password will apply. Go to "add a post" and add any image from your computer... wait for it to upload, now delete it. This step is to have the server create the uploads folder to be 100% certain is registered by wordpress and set to the correct permissions. I've wasted hours before by transferring the uploads folder directly by FTP, so don't do it.
Step 5 created an uploads folder in FTP, now you can drag and drop the contents of your uploads folder (ie 2008, 2009, 2010, 2011 + subfolders) into the uploads folder. There should be nothing in it except an empty folder (because you deleted that file in step 5), so it's fine to overwrite if it warns you.
The only remaining step is to transfer your plugins. You can do it via FTP, although it's probably faster to add them directly through the Wordpress admin via "add plugin" and search + install.
Oh yeah, now go to permalink settings and click "default", update, then choose whatever you want-- you need to refresh permalinks to.
That's foolproof... but you have to be somewhat familiar/confident using PHP myadmin. Although I've founds some widgets do not transfer via this method, so you may have to drag and drop some widgets again (appearance -> widgets) after the transfer.
For clarification on step 1 and step 3, see the diagrams here: http://webdesignerwall.com/tutorials/exporting-and-importing-wordpress ... but the rest of that WDW tutorial is guaranteed to give you problems at somepoint.
As mentioned in the comments, you will need to browse to the Settings->General page and update your site URL and wordpress URL.
If you can't get to the Settings page because you get redirected to your local site (this has happened to me before), you may have to edit the values in mysql directly, which isn't too bad, really.
The settings are located in the wp_options table under the option_name "siteurl" and "home". If you need more help with that, post a comment.
You may need to refresh your permalinks: see step 5 below. Official documentation on this subject may clear some things up as well.
Steps to move a local WordPress install to a live site
This is my method, and it has worked every time. Assume local WP install is at http://localhost/wordpress/ with WP database named
wordpress
and live WP install is at http://livesite.com/ with WP database namedlivesite
:wordpress
from side menuAdd DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT statement
wordpress.sql
WordPress Address (URL)
andSite Address (URL)
wordpress.sql
tolivesite.sql
/wp-config.php
to have live database name, username and passwordlivesite
database yet, do so nowlivesite
from side menulivesite.sql
from step 2livesite
databasepermalink structure updated
. If not make a frivolous change to get it to do so, e.g. change permalink structure and then revertNOTES