A one-file developer-script for renaming URLs in your wordpress DB. I use this script quite often to move a wordpress installation from a test-subdomain to the real domain, or from localhost to the server.
Prerequirements: All thinks are in place. You have setup your wp-config.php correctly, the DB is reachable ... and so on.
- Download or checkout the script (
rename.php
) and place it in a public accessable directory. (Note: there is no authentication mechanism - delete the file once your ready.) - Create a
rename_config.php
file and add your settings. - Open the script in your Browser and click the start-button.
$GLOBALS['TM_RENAME_SETUP'] = array(
'system' => __DIR__, //Path to wp-load.php
'old' => 'http://my-old-url.de',//Attention: without post-slash
'new' => 'http://my-new-url.de',//Attention: without post-slash
);