WordPress generating wrong URLs

I am a completely newbie in wordpress. At this moment, my blog URL is blog.mysite.com, and in the past it was www.mysite.com/blog.

The URLs and links are ok in the blog, because I changed the base URL in wp-config file. However, the images are still using the old route.

Read More

This is the URL of my pictures:

blog.mysite.com/wp-content/themes/canvas/functions/thumb.php?src=http://mysite.com/blog/wp-content/uploads/2012/04/bname-268x300.jpg&w=150&h=150&zc=1&q=90

As yoy can see, it is using TinThumb plugin, but the URL that it is using is the old one.

Can anyone help me to fix it?

Related posts

Leave a Reply

3 comments

  1. WordPress main drawbacks is it saves complete image url in db.
    So if you migrating your site you have to search & replace url in your sql file & need to dump it again.

    I suggest you to do it manually and follow the steps mention here.

    Also there is plugin available to do the same named Search and Replace.

  2. add the two lines in wp-config

    define('WP_SITEURL', 'http://newsiteaddress.com/');
    define('WP_HOME', 'http://newsiteaddress.com/');
    

    please note that some plugins that use the file system like ssome caches may have to be reconfigured or the cache may be reconfigured

  3. You need to dump database to file and replace all strings ‘mysite.com/blog’ to ‘blog.mysite.com’, and after overwrite database by fixed dump.
    Sorry for my bad english.