WordPress not reflecting changed of the database

my problems started when I moved my website to another folder (from /dev/ to /).
I have gone through the whole database in order to change all the hardcoded /dev/ into / but I still notice that wordpress, somehow, still uses the old values.

Basically the website uses information that are not there anymore.
I checked my own and the server cache and they all seem to be clean (the server doesn’t even seem to have that feature on).

Read More

So, I am pretty much lost…

Related posts

Leave a Reply

2 comments

  1. When you move a wordpress install, you need to change the site URL throughout your database. To do this you’ll need to export your current database via PHP MyAdmin, and then use a tool like:

    http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    …to do a search and replace on the entire database.

    Search for:
    http://www.yourwebsite.com/dev

    replace with:
    http://www.yourwebsite.com

    Then import the new database, open your WordPress site via wp-admin and re-save permalinks.

  2. Run this query in your database

    set @oldurl = 'http://oldwp-url.com', @newurl = 'http://newwp-url.com';
    
    UPDATE wp_options SET option_value = replace(option_value, @oldurl, @newurl) WHERE option_name = 'home' OR option_name = 'siteurl';
    UPDATE wp_posts SET guid = REPLACE (guid, @oldurl, @newurl);
    UPDATE wp_posts SET post_content = REPLACE (post_content, @oldurl, @newurl);
    UPDATE wp_posts SET post_content = REPLACE (post_content, CONCAT('src="', @oldurl), CONCAT('src="', @newurl));
    UPDATE wp_posts SET guid = REPLACE (guid, @oldurl, @newurl) WHERE post_type = 'attachment';
    UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, @oldurl, @newurl);