WordPress Plugin: Update URLs

One common problem with moving WordPress to a new domain or directory is that updating the settings does not update the permalinks or urls embedded in the content. This means that images and other uploaded content will not show up!

This plugin fixes that problem. It updates all urls and content links in your website to reflect the move to the new domain or directory.

Download the Update URLs plugin

Current stable version: 1.0.2

Features

  • Displays current WordPress url and installation location.
  • Choose whether links embedded in content should be updated.

Screenshot

Update URLs 

Installation

  • Download the plugin and unzip.
  • Put the velvet-blues-update-urls folder in your wp-content/plugins folder.
  • Activate the plugin through the Wordpress admin.
  • You can access the plugin by going to Settings -> Update URLs.

FAQs

  1. Do I need to approve each change? Or does the plugin update all urls at once? The plugin updates all urls at once. However, the next version will give you the option to ‘Replace All’ or selectively replace/edit some urls.

To Do

  • Verify backward compatibility with Wordpress versions < 2.5
  • Language support
  • Get hosted by WordPress.org  Done!

Donate

Feeling generous? Make a donation to fund this and the development of other plugins.

Support

For help with this plugin or suggestions, leave a comment below. For more general information on moving WordPress, check out the official documentation or our comprehensive guide.

Update Log

1.0.1 - Eliminates any conflicts with other plugins due to naming conventions.

1.0.2 - Fixed PHP short tag problem, so as to be compatible with all configurations.

Tags: , ,

57 Responses to “WordPress Plugin: Update URLs”

  1. On October 5th, 2008 at 6:26 am, SEO/SEM blog Mozilla Firefox Windows wrote:

    Thanks for the plugin.
    Does it update a single URL i enter or it simply changes the whole permalink structure. For example if i change from http://www.domainname.com/index.php/archives/post-name/ to http://www.domainname.com/post-name/ can the plugin change all url from the old structure to the new one or i have to change url by url separately?

    Thanks.

  2. On October 5th, 2008 at 7:13 am, Velvet Blues Mozilla Firefox Windows wrote:

    Thanks for visiting. :-)

    No, this plugin is for moving WordPress to a new domain or directory. So when you enter your ‘old’ and ‘new’ domains/urls, it will update the permalinks as well as any links in post/page content.

    But that’s a great idea for an additional feature. It would be frustrating to update the permalink structure and then manually have to find all links using the old structure. I’ll have to add that to the next version.

  3. On October 5th, 2008 at 8:29 am, SEO/SEM blog Mozilla Firefox Windows wrote:

    Yes, that would be a good feature. Thanks for the plugin again. Great job!

  4. On October 6th, 2008 at 12:56 am, sunny Internet Explorer Windows wrote:

    use this plugin BEFORE or AFTER I moved the wordpress files??

  5. On October 6th, 2008 at 1:09 am, Velvet Blues Mozilla Firefox Windows wrote:

    You could use this plugin before or after, but I’d suggest after. Are you moving to a new domain or a new directory?

  6. On October 6th, 2008 at 1:11 pm, Dag Mozilla Firefox Windows wrote:

    I have the problem of image theft and have used .htaccess to fix the problem. I have since found something that will work better for me but what I need to do is to change the DIR for the uploaded image files and also update the location in the posts for all posts/uploaded-images.

    Will this pulgin do this for me?

  7. On October 6th, 2008 at 6:02 pm, Velvet Blues Mozilla Firefox Windows wrote:

    No, this is plugin is just for moving WordPress. But that is another great feature that I’ll put on my list of things to add in the next version. :-)

  8. On October 9th, 2008 at 5:01 am, Luis Mozilla Firefox Mac OS wrote:

    If moving to a new domain, what steps do you recommend?

  9. On October 9th, 2008 at 7:57 am, Velvet Blues Mozilla Firefox Windows wrote:

    @Luis, Your quickest method would be to use a WordPress export/import file.

    Here are the steps:

    1. On the old domain, go to ‘Manage -> Export’ and create a WordPress export file. It will contain all posts, pages, comments, categories, etc…

    2. On the new domain, create a working WordPress installation.

    3. On the new domain, go to ‘Manage -> Import’ and upload the export file you created in step 1.

    4. Using FTP, (or whatever other method you prefer) download the old domain’s wp-content folder (namely for your theme, plugins, and uploads), and upload this to the new domain.

    5. Install this Update URLs plugin and use it to update all links. This will fix all of the image links so that they don’t point to the old domain, as well as any other links that still have the old domain in them.

    Let me know if you have any questions.

  10. On October 9th, 2008 at 10:12 pm, Susan Mozilla Firefox Windows wrote:

    It appears to be a good plugin - I’ll see when I make the move!

  11. On October 13th, 2008 at 11:33 am, pet Mozilla Firefox Windows wrote:

    Hi, does this plugin solve the SEO problem? 301 permanent redirection. The point is to find the simple way to preserve “old” search information and number of incoming readers…

  12. On October 13th, 2008 at 11:49 am, Velvet Blues Mozilla Firefox Windows wrote:

    No it doesn’t. It just makes it easier to move a blog by updating permalinks and content links.

    For 301 redirection, you’ll have to modify your .htaccess file…

  13. On October 16th, 2008 at 10:12 pm, Haplo Mozilla Firefox Windows wrote:

    Does it also changes links on the coments email fields? If you comment on your own blog, you write your email and it can be @yourolddomain.com, does it changes it to @yournewdomain.com?

    You say it updates permalinks, so I understand this overrides and modifies your wordpress permalinks settings, am I right? Or are you referring to any link inside the content of a post?

    And, this is very similar to the search and replace plugin, is it not? Just easier for us.

  14. On October 16th, 2008 at 11:10 pm, Velvet Blues Mozilla Firefox Windows wrote:

    No, it doesn’t change comments. It just updates the links in posts (if you select this option) and the permalinks.

    When you move a WordPress blog, the permalinks aren’t updated. And the biggest thing that is affected by this is linked media. Your images and other uploads will not work. This plugin fixes that problem by making sure to replace all occurrences of the old location.

    Yes, it does perform some of the same functions to the search and replace, except it is more specialized, and well suited for moving a website.

  15. On October 16th, 2008 at 11:14 pm, Haplo Mozilla Firefox Windows wrote:

    The permalinks doesn’t get updated even if you manually update the permalink settings in the wordpress dashboard?

    If I change the permalinks on my actual blog, say to show short dates, then they get updated (and I was under the impression that they do so dynamically), so why is that in a new domain, if you manually set the permalinks to your liking, they don’t update?

    Thanks in advance.

  16. On October 16th, 2008 at 11:24 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Haplo, these are two different things. This plugin is for moving a WordPress website….

    If you are just updating your permalink structure, then you have no need for this plugin.

    If, however, you move to a new domain, you will notice that your images (and other uploads) still point to the old domain. (Or if you create a custom function and use $post->guid, you will find that this value also uses the old domain.) This is because the actual WordPress database is not updated. It stays the same, regardless of the settings you choose in General->Settings. This plugin fixes that problem.

    It has nothing to do with the actual permalink structure. It just updates the database to reflect the move.

  17. On October 16th, 2008 at 11:40 pm, Haplo Mozilla Firefox Windows wrote:

    I can’t seem to get through, lemme try again :)

    I realize that this is for moving your blog to another domain, right now I’m doing that and I’m researching everywhere for things I’ll most likely come up. I’d rather have a solution beforehand.

    Now, I understand this as a permalink:
    http://www.velvetblues.com/web-development-blog/wordpress-plugin-update-urls/
    That’s the link to this very post, wordpress calls it “permalink” and you can change its format under your dashboard. So far so good.

    If you add an image to this post, and a link in the content to another part of your blog, those will NOT change automatically when you move your domain, how could they?
    BUT the “permalink”, the link to this post, will change once you tell wordpress the new structure of the links, AND the blog url and blog home (or so I think).

    Now, if you’re talking about those same permalinks as I am, then I really don’t understand why they won’t change, after all they’re generated dynamically by wp, and If you can change them now, why not later?

    And, if you’re talking about those, then your plugin will come very much in handy, and the search and replace one, because that one also changes some tables that yours don’t, or so I seem to read about.

  18. On October 16th, 2008 at 11:54 pm, Velvet Blues Mozilla Firefox Windows wrote:

    When you move to a new domain, your database IS NOT updated. However, when you update your settings, WordPress ‘parses’ the urls prior to outputting them, so it looks as though they are updated.

    Problem 1. Images and Uploads. These are still linked to the old domain.

    Problem 2. Plugins or Custom Functions that pull the url from the database. These will retrieve the old url, regardless of your settings because the database hasn’t been updated.

    Problem 3. Links to other posts. These are also not updated.

    The plugin fixes all of the above.

    If you ever take a look at your WordPress database, you’ll see the problem. Navigate to the table wp_posts and look at the column ‘guid’.

    For another perspective, see this blog:
    http://www.mydigitallife.info/2007/10/01/how-to-move-wordpress-blog-to-new-domain-or-location/

  19. On October 17th, 2008 at 12:01 am, Haplo Mozilla Firefox Windows wrote:

    Oh I see! That’s the “real” link to the posts and all, WP only masks them!

    Well, thank you very much, will try your plugin later (I hope)

  20. On October 17th, 2008 at 12:02 am, Haplo Mozilla Firefox Windows wrote:

    And yes, I have already looked at that link, but I don’t want to mess directly with sql commands unless I have no other choice, thanks!

  21. On October 17th, 2008 at 12:03 am, Velvet Blues Mozilla Firefox Windows wrote:

    Yep! :-)

  22. On October 21st, 2008 at 8:33 am, Moving To A New URL | SuperBlog Directory Blog WordPress wrote:

    [...] Update URLs does the heavy lifting for you in an easy to use plugin. Just enter your old and new URLs and the plugin scours your posts and pages for the outdated URL and replaces it with the new one. A minute or so later you are done. [...]

  23. On October 25th, 2008 at 8:57 am, Boo Casanova Mozilla Firefox Windows wrote:

    Hi Velvet Blues,

    Can you please have a look at my blog? i have installed your plugin (THUMBS UP, i must say) and change the urls. However, it appear my pictures link come up with 2 domain name, that’s why it is still not showing. can you tell me what’s wrong?

    Thanks!

  24. On October 25th, 2008 at 9:30 am, Velvet Blues Mozilla Firefox Windows wrote:

    Hi Boo,

    I’ve taken a look… Have you transfered your ‘uploads’ folder to this new domain? I wasn’t able to find any of the images that are being referenced.

  25. On October 25th, 2008 at 9:46 am, Boo Casanova Mozilla Firefox Windows wrote:

    Hi Velvet Blues,

    Yes, I actually use the “import” and “export” function by WP. I managed to import everything including the “uploads”. But I can’t view any of the pics because it was, like you mentioned here, still using the old domain name.

    you can see the red dot on my blog, those are supposed to by my picture link. if you move your cursor on it, u can see the link location. i notice, they have double domain name on it hence the pictures is not showing.

    is it because i created this blog in my root directory in my hosting? i am trying to create another test blog under subdirectory: http://www.boocasanova.com/blog and try changing the urls there.

    but if possible, i would like to stay on the root directory: http://www.boocasanova.com.

    thanks!

  26. On October 25th, 2008 at 9:57 am, Velvet Blues Mozilla Firefox Windows wrote:

    Hi Boo,

    Yes, I took a look at your code. There are NO double urls. But urls are being referenced without the http, like this:

    src=”www.boocasanova.com/wp-content/uploads/2008/10/addie-dopey-272×338.jpg”

    That’s the first image. (If you are wondering why they show the double url when you try to view it, its because browsers ‘get confused’ without the http and assume its a relative link. But the url structure in your source code should work if images were present.)

    …So if you put that url in your browser, it doesn’t actually retrieve an image. So, this is why I asked if your images were transferred.

    http://www.boocasanova.com/wp-content/uploads/2008/10/addie-dopey-272×338.jpg

    Please manually verify that your images are there. If not, you will have to upload them. In many cases, WordPress’ import/export function doesn’t actually import ‘uploads’.

  27. On October 25th, 2008 at 9:59 am, Boo Casanova Mozilla Firefox Windows wrote:

    hi again,

    i just notice, even tho the “upload” folders were imported correctly but somehow the pictures file were not! am uploading the pics now. :(

    and thanks for explaining the double url problem.

    i think my problem is solved!

    thanks!

  28. On October 25th, 2008 at 10:17 am, Velvet Blues Mozilla Firefox Windows wrote:

    Hopefully. Let me know if you run into any more problems. :-)

  29. On October 25th, 2008 at 12:13 pm, Boo Casanova Mozilla Firefox Windows wrote:

    THANK YOU SO MUCH! and especially your email coz that kinda save the day! i’m not sure why but perhaps because my WP is in the root directory, even tho using your plugin to change the urls but i still need to do another step in adding the “http://” as told by you in the email.

    but if you see my test blog at http://www.boocasanova.com/blog, it doesn’t have this problem. so maybe this is a new issue you can look into.

    once again thank you. i’ve been scratching my head for days wonder why the image is not showing.

  30. On October 25th, 2008 at 12:19 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Yes, it was strange. I’ve actually never seen that problem and I’d have to know all the steps you used as well as the format of your urls in your previous blog. (Feel free to send me the old url if it is accessible.)

    But I’ve used this on many blogs without any problem… However, I’ll definitely add this as another ‘fix’ for the next version. (ie. automatically check image link format)

    Anyway, I’m glad you’re up and running! Moving a website can be very frustrating. :-)

  31. On October 25th, 2008 at 12:32 pm, Boo Casanova Mozilla Firefox Windows wrote:

    i’ve mail you a lengthy explanation. :)

  32. On October 27th, 2008 at 9:38 pm, champ Mozilla Firefox Windows wrote:

    It is not stable anymore. I can’t get it to work :(((
    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected $end in wp-content\plugins\velvet-blues-update-urls\velvet-blues-update-urls.php on line 92

  33. On October 27th, 2008 at 9:47 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Hi champ,

    The plugin is fine. I think it might be an interaction with other plugins… I will be re-releasing another version shortly which should fix any possible naming interactions.

    Btw, which other plugins are you using?

    Thanks…

  34. On October 27th, 2008 at 10:36 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Well, I just released a patched version which should not have any naming conflict.

  35. On November 6th, 2008 at 9:01 pm, Ken Internet Explorer Windows wrote:

    I have no wordpress experience.. I’m a programmer who works in M$ technologies.. my company has a wordpress blog called say foobar.com - they want to change the name to blog.companyname.com. I’m very confused as to if I have to create a new directory structure - copy files and then run the plugin / db updates or if I can just run the plugin and have the current db struct stay intact. Any help will be much appreciated.

  36. On November 6th, 2008 at 9:22 pm, Ken Internet Explorer Windows wrote:

    To add.. I ran the 3 update statements mentioned in the following article.. http://www.mydigitallife.info/2007/10/01/how-to-move-wordpress-blog-to-new-domain-or-location/ - the updates work fine but then the site become unusable.. I get Great Success! Then a default apache page - so I bail and just set the wp_options siteurl back to original and it works again.. what am I missing?!

  37. On November 6th, 2008 at 9:31 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Assuming both are on the same server, you need to copy your site to the new directory. This means you will have two WP installs. Then, in the old install, update the settings. You should then be able to log into the new install, rendering the old one unusable.

  38. On November 9th, 2008 at 9:01 pm, Ken Internet Explorer Windows wrote:

    I don’t get.. I have a domain with a fully functional wp site. http://thinkinginbox.com all I want to do ia change the domain to blog.blueskyfactory.com. If I change the IP address of blog. to thinkinginbox - i get an error.. ok so I change the siteurl in siteoptions then they both die? Can’t I just make the site work with a different domain without having to reinstall the entire site? currently our thinkinginbox domain is installed in the root web directory if that helps at all.. Sorry I really don’t know much about WP - typically I set up a site - ftp it.. setup DNS and it just works.. not sure where the mental block is here with my little brain . please help..

  39. On November 9th, 2008 at 9:25 pm, Ken Internet Explorer Windows wrote:

    I’m a little confused… I don’t want 2 different installs of the same server.. I just want to make our current site that is installed on our root web directory… http://thinkinginbox.com to work with the domain http://blog.blueskyfactory.com... I changed my DNS - but when I try to use the domain I get an apache ‘Great Success - Apache is working on CPanel. And if I update the wp_options siteurl to the new domain - then both domains die..

    How can I make our current install just work with a different domain? Is this possible or do I need to do a install on a different server?

  40. On November 9th, 2008 at 10:21 pm, Ken Internet Explorer Windows wrote:

    never mind…. I figured it out.. was apache config issue..thanks

  41. On November 12th, 2008 at 2:19 pm, Scott Mozilla Firefox Windows wrote:

    OK, I got this when I went to activate. Any ideas?

    Parse error: syntax error, unexpected $end in C:\wamp\www\wp-content\plugins\velvet-blues-update-urls\velvet-blues-update-urls.php on line 92

  42. On November 12th, 2008 at 8:11 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Hmmm. We ran into this issue once with the initial release. There were some plugin interactions… If you are using the latest version (1.0.1) downloaded from the WordPress Repository, then it would have to be something else…

    The other person who had this problem has a similar directory structure as yours… ie. a local/testing server… I have tested this on the XAMPP server but will investigate further.

  43. On November 17th, 2008 at 10:56 am, Scott Mozilla Firefox Windows wrote:

    Looking forward to a solution! I did get the latest release if that helps @ all. Maybe I’ll try turning off some plugins just to see Thanks!

  44. On November 17th, 2008 at 11:03 am, Scott Mozilla Firefox Windows wrote:

    Update. I tried turning off my plugins one by one and Update URLs threw the same error as posted above. hmmm.

  45. On November 17th, 2008 at 11:37 am, Velvet Blues Mozilla Firefox Windows wrote:

    Well, it must be something particular to local servers… I am still investigating this issue. Thanks again for your feedback.

  46. On November 17th, 2008 at 1:12 pm, Scott Mozilla Firefox Windows wrote:

    I think i got it. I was looking around and found this…

    http://www.mydigitallife.info/2006/04/23/php-parse-error-syntax-error-unexpected-end/

    Changed in php.ini
    short_open_tag = Off (2 instances) to =On, restarted WAMP services and the plugin activated! :-)

    If this works, this plugin will save me tons of time! Thanks!

  47. On November 17th, 2008 at 1:19 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Thanks so much! Let me know how it goes. I did use short tags in one location and am now updating the plugin.

  48. On November 17th, 2008 at 1:35 pm, Scott Mozilla Firefox Windows wrote:

    I will. Thanks!

  49. On November 17th, 2008 at 4:41 pm, Louis-Philippe Mozilla Firefox Windows wrote:

    Is it possible to use this plugin to change

    http://xyz.com/blah-blah-blah

    to

    http://abc.com/blah-blah-blah

    automatically? I have tons of images which are still related to the old domain. Do I need to change the URL one by one or can it be done all automatically?

    Cause I tried the plugin and it does not seem to work for me.

  50. On November 17th, 2008 at 4:48 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Yes, the plugin does just this. And it does all at once.

    For it to work, you will need to enter the old and new urls in the respective fields and then submit.

    Please send me the url of a page where it ‘didn’t seem to work’ and I’ll let you know what happened. One common problem is the use of ‘www’. Sometimes images are referenced in the database without the ‘www’. So you might try to update it like that. ie. http://newdomain.com and http://olddomain.com instead of http://www.newdomain.com and http://www.olddomain.com

  51. On November 17th, 2008 at 4:52 pm, Louis-Philippe Mozilla Firefox Windows wrote:

    Hi,

    Thanks for your reply:

    This URL is the one by Google and it does not work:

    http://uhec.net/b/wp-content/uploads/2007/11/dumontboyschout1.jpg

    In fact, the image is here:

    http://lelectronlibre.net/b/wp-content/uploads/2007/11/dumontboyschout1.jpg

    But it does not work…

  52. On November 17th, 2008 at 4:54 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Could you give me the url for the page on which this image is located?

  53. On November 17th, 2008 at 4:59 pm, Louis-Philippe Mozilla Firefox Windows wrote:

    Hi,

    I was able to update the files and it shows correctly on my web site, but on google it’s still the old site and I’d like to update them…

  54. On November 17th, 2008 at 5:02 pm, Velvet Blues Mozilla Firefox Windows wrote:

    I’m confused… If you are talking about Google’s image search, this plugin can’t help with that. Google’s indexes are completely unaffected by anything that we could do…

    Perhaps I don’t understand the question?

  55. On November 17th, 2008 at 5:05 pm, Louis-Philippe Mozilla Firefox Windows wrote:

    Hmm… I have no doubt that in one year or more Google will have indexed my images correctly to the new URL. The problem right now is that those images are still linked to the old site, so I was looking for a way to change the link to the old site to the new site, e.g.: http://www.oldsite.com/image/image1.jpg to http://www.newsite.com/image/image1.jpg

  56. On November 17th, 2008 at 5:14 pm, Velvet Blues Mozilla Firefox Windows wrote:

    Well, this plugin is for moving a site to a new location. It appears that you have moved from ‘uhec.net’ to ‘lectronlibre.net’. So when you run the plugin, all urls for your own uploaded images will be updated accordingly.

    But this plugin does not affect any external websites.

    It is possible, however, to create a redirect via an .htaccess file so that Google doesn’t redirect to a non-existent file, but this plugin doesn’t do that…

  57. On November 17th, 2008 at 5:16 pm, Louis-Philippe Mozilla Firefox Windows wrote:

    Thank you very much for your reply. It seems it does not help me, but still I think it is an interesting plugin. Thanks.

Leave a Reply

Want us to work on your project?

Contact us today for a quote. Click here to submit details regarding your project.

If you are making a general inquiry, send an email to info@velvetblues.com