WARNING: THIS IS AN ACTIVE DEVELOPMENT BRANCH!
There is no guarantee that this branch of WordPress Domain Changer will work.
WordPress Domain Changer
A self-contained script/tool developed to help ease migration of WordPress sites from one domain to another.
Please Visit This Page for a complete overview.
- Backup your WordPress database.
- Seriously, Back Up Your Database!
- Situation One: The WordPress files and database locations have not changed -- just the domain name.
- Skip to step 5.
- Situation Two: You have a new server where you intend to upload your existing WordPress site files.
- Export the current WordPress database data into a sql dump file.
- Create a MySQL database on the new server.
- Import the WordPress database dump file into the newly created database.
- Open up the wp-config.php file and set DB_HOST, DB_USER, DB_PASSWORD, and DB_NAME to the correct values for the new server.
- Upload the WordPress directory contents to the domain directory on the new server.
- Open up wp-change-domain.php in a text editor and scroll down to the "CONFIG" section.
- Under "Authentication Password" replace the default password with a VERY secure password of your choice.
- Upload wp-change-domain.php to the root directory of the WordPress site.
- Note: The root directory is where the wp-config.php is located.
- In a web browser go to: http://www.yourNewDomain.com/wp-change-domain.php
- Type in your password that you set in step 6 at the authentication prompt.
- You will now be presented with the domain changer form.
- The script will try and auto-detect all of the settings, but it's up to you to confirm they are all correct.
- If the script detects that you're running a WordPress Multi-Site install then a checkbox will be visible.
- If checked, the domain change will be applied to all sites.
- Take one last look at the settings to verify that they are correct... then click the "Change Domain!" button.
- Go to your site's home page at the new domain -- all should be working!
- Once the domain has been changed remove this script from the server!
- The following database table fields are affected.
The following only applies to Multi-Site Installs
The script will attempt to make a copy (backup) of the wp-config.php file in the wordpress root directory.
If a copy was successfully made then an attempt is made to edit the wp-config.php file in order to reflect the changes made to the site's domain. Below are values changed in the wp-config.php file...
- Constant: DOMAIN_CURRENT_SITE
- Constant: PATH_CURRENT_SITE
- Variable: $base
The script will attempt to make a copy (backup) of the .htaccess file in the wordpress root directory.
If a copy was successfully made then an attempt is made to edit the .htaccess in order to reflect the changes made to the site's domain. Below are values changed in the .htaccess file...
- Directive: RewriteBase
Wordpress Domain Changer is released under the New BSD license.