Wordpress tips: bulk update of permalinks and image paths



When you change domain for an existing wordpress blog, it may be difficult to upgrade permalinks and posts meta.

Wordpress

In this post Kevin Dees presents a quick and easy solution, with 3 SQL commands:

Warning: read the notes in the post before launching random SQL commands:

  1. Backup the DB first.
  2. Second, you will need to change the domain placeholders in this code to your own before it will work it’s magic.
  3. If you have any plugins installed this code may change the domins for them too. This is not guaranteed so you will need to check the DB first.
  4. If a plugin has added its own tables and you need to change the links it stores, you will need to run the replace on those cells as well.
  5. This is the most important! Be sure to change the table prefix. If you don’t this will not work when it has been modified.

Published: September 15 2015