Thursday, July 12, 2012

PHP script to replace site url in Wordpress database dump, even with WPML

Wordpress has the nice habit of storing every URL with its full path in the database. You sure can hardcode the HOME_URL and SITE_URL in the wp-config.php but it won't change the references to your medias, serialized strings, encoded HTML, etc.

The only solution is really just to edit the database. At least, I haven't found a better solution.


wordpress-change-url.php < database.orig.sql >


wordpress-change-url.php database.orig.sql >

Will output all remaining mentions of to stderr

No comments:

Post a Comment