changing domains on a Wordpres site
April 18, 2008 6:48 PM   Subscribe

I need to create a website in Wordpress in a test domain, and then when it's all ready, to move it to another domain. What's the best workflow to accomplish this?

I assume because Wordpress runs off a database, that it's going to be more complicated than just a search-and-replace www.testdomain.com for www.realdomain.com throughout the php code. What are the steps I need to take? I will also have various plugins installed - is there anything to say about them re: the domain change, or is it highly dependent on the specific plugins?

FWIW, the site will be on the same server, with the server environment identical in all respects (OS, php version, etc.). It will just need to point to a new domain.
posted by stupidsexyFlanders to Computers & Internet (5 answers total) 3 users marked this as a favorite
 
This is actually pretty simple. I've done it recently. You can

- build the site, then when you're ready to move it
- backup the database using some standard plug in for this. I use Wordpress Database Backup
- setup the db on the new server & make sure it's properly configured in wp-config.php
- install wordpress on the new server
- ftp the entire site without the database to the new server (mostly just the wp-content directory actually)
- re-import the db from the backup
- change a few configurations to say "hey there is a new URL here"
- update permalinks

presto!
posted by jessamyn at 7:06 PM on April 18, 2008 [2 favorites]


Best answer: Wordpress has a built in Import/Export function - unless I'm misunderstanding the question, you don't event need to touch the database or run a database backup. If you don't want to create a fresh wordpress install for your live domain, then you'll just need to change a few settings in the options menu and a few lines in wp-config.php

As jessamyn said, it really is pretty simple.
posted by stuboo at 7:46 PM on April 18, 2008


I usually do a lot of unique configuration and set-up with WP installs that I want to bring over from development to deployment, so I dump the database (either from the mysqldump command line app or with something like Wordpress Database Backup as mentioned by jessamyn) and search-and-replace for "test.domain.com" to "live.domain.com" on the dumped sql file. Create your new database from that file and you'll be good to go.
posted by maniactown at 8:26 PM on April 18, 2008


FWIW, the site will be on the same server, with the server environment identical in all respects (OS, php version, etc.). It will just need to point to a new domain.
As stuboo said, if you're just changing domains, I think you only need to change a few options in the Admin Settings Panel and modify one or two lines in the wp-config.php file and that's it. No physical moving of files needs to take place though you may want to backup the database anyways.
posted by junesix at 1:42 AM on April 19, 2008


Best answer: Oh, I may have misspoke. If you're using the actual same database and just moving domains there are literally like two things you have to change, I think

- the WordPress address and blog address in WP - settings - general
- re-write your permalinks in WP - settings - permalinks. May just have to click "save changes"

Unless you have URLs hard-coded in the stylesheet or elsewhere, changing the variable on the settings page should update it everywhere WP knows what your domain name is. Yay for CMSes! Otherwise if you have to move databases, what I said before should be fine.
posted by jessamyn at 8:02 AM on April 19, 2008


« Older Teaching English in japan/germany   |   I drink; therefore, I reek? Newer »
This thread is closed to new comments.