my website was installed and fixed on localhost, then i hosted it on a distant server, i also chaged the parameters in the wp-config.php file to meet to distant database. However, when i try to call it in the url tab, i see always the localhost call in the bottom of the browser. This is my url website.

3 Answers 3


All of your content is linked to your localhost install. I would suggest using a plugin like Search & Replace to amend your URLs. Also if you haven't already, you will need to change the two entries in the wp_options table (where wp_ is the prefix used). They are rows 0 & 37. These are your URLs for moving your site.

The next time you move your site from local to a live site check out the WordPress guide, it's got lots of handy tips and solutions to problems like this.


You must change URLs in the database: Use these queries in phpmyadmin:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.olddomain.com/', 'http://www.newdomain.com/') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.olddomain.com/blog/','http://www.newdomain.com/');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.olddomain.com/blog/', 'http://www.newdomain.com/');

UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.olddomain.com/blog/', 'http://www.newdomain.com/');

And check to see if any URLs are hardcoced in theme files. See Moving WordPress « WordPress Codex and How to Move WordPress Blog to New Domain or Location » My Digital Life


If you're au fait with using PHPMyAdmin, or whichever MySQL web-interface you've been using, my recommendation would be to do the following;

  1. Export your entire database in SQL format
  2. Open the SQL file in a program like Notepad++ (any syntax-highlighter will do but this is my preference)
  3. Press CTRL+H to open the "Find & Replace" dialogue box.
  4. In "Find", enter "localhost"
  5. In "Replace", type "www.patisserie-orient.fr/zconsulting"
  6. Hit "Replace All in Current Document"
  7. Save the SQL file AS a different name (ensuring a back-up of your old file)
  8. Drop your entire database (only if you're 100% sure you have a copy!)
  9. Import the new SQL file

You should now have a fully up-to-date database using your new URL.

This method is especially effective if you use a number of plugins as I've found they often store absolute URLs in the wp_options table.

  • Using find/replace with a text editor in a text dump doesn't work; it breaks serialzed data. Feb 20, 2012 at 14:38
  • Ah, of course. How would you go about changing such details for plugins using serialized data then?
    – turbonerd
    Feb 20, 2012 at 14:45
  • Use queries in phpmyadmin for that plugins options table Feb 20, 2012 at 15:54
  • Could you explain what you mean? I don't understand how that will help with serialized data. Does MySQL have code to serialize data?
    – turbonerd
    Feb 21, 2012 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.