I original set up a domain and hosting with a wordpress install. It was an alternate domain for testing while we finalized the site.
The real domain is http://resumescanada.ca - I would like when entering this domain it actually stays on this domain - right now I have a redirect going.
Erez S answers:
Add this to your wp-config file:
Chad Mueller comments:
I obviously have to remove the redirect from the hosting company correct?
Erez S comments:
Well, if you have redirect on this domain to the second domain, then yes, remove the redirect and add the code I'v wrote for you.
Chad Mueller comments:
Yeah that seems to have worked - I have to clear some cache and do some further testing - but it seems to have done the trick....
Karl Oakes answers:
The manual solution:
1. On the test domain, export WP db from mySQL to a SQL dump file.
2. On the new domain, create a new DB for WP that matches your migration DB and then import mySQL dump to new DB.
3. Change 'siteurl' and 'home' columns in wp-options table to reflect new domain.
4. Download entire WP site from test domain and then change DB settings (DB_NAME, DB_PASSWORD, DB_USER) in the wp-config.php ( if required, not needed if you matched the db, user and password in your new domain ) to match new domain.
5. FTP to new domain.
Or use a plugin :
If you have posts on previous domain, you have to run sql query to replace address strings too. Here is the step by step things you can do.
1. transfer all files from http://resumes-canada.ca to http://resumescanada.ca server.
2. get database dump of http://resumes-canada.ca and import it in http://resumescanada.ca
3. run sql query to replace address strings. to do that, login into your phpmyadmin of http://resumescanada.ca. Go to query and run these query :
UPDATE wp_options SET option_value = replace(option_value, 'resumes-canada.ca', 'resumescanada.ca') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'resumes-canada.ca','resumescanada.ca');
UPDATE wp_posts SET post_content = replace(post_content, 'resumes-canada.ca', 'resumescanada.ca');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'resumes-canada.ca', 'resumescanada.ca');
Finaly open wp-config.php in your resumescanada.ca and adjust the following parameters:
/** The name of the database for WordPress */
define('DB_NAME', 'DATABASE NAME ON resumescanada.ca');
/** MySQL database username */
define('DB_USER', 'DATABASE USER NAME ON resumescanada.ca');
/** MySQL database password */
define('DB_PASSWORD', 'DATABASE PASSWORD ON resumescanada.ca');
/** MySQL hostname */
One more thing, if you use phpmyadmin, easiest way to run query is select the Database name on left then on right side, there will be a tab called SQL . Paste the query in there and execute it.