1

Possible Duplicate:
Easily Move a WordPress Install from Development to Production?

I Setuped a Wordpress site on http://domainname.com/test/ now I want to move everything to main domain http://domainname.com/

How to do this without loosing anything? and most important thing http://domainname.com is live site so moving should take very less time if possible.

Any suggestion would be appreciated?

Wordpress version is 3.0.3 and Hosting is Dreamhost. I have access to everything. FTP, Database.

0

4 Answers 4

3

I personaly do that in 3 steps:

1) in the admin i change both wordpress and site adresses from 'domainname.com/test/' to ' domainname.com/'. After saving it'll break the site, no worries.

2) i move ftp files from the /test/ folder to the root one (gives back the admin and site).

3) i finally change database datas that refer to the old url '.../test/' by using the plugin search and replace. Gives back all the pictures uploaded for exemple.

Did it again this morning, works fine. And as pootzko says, backup backup, you never know what can happen.

7
  • +1 thanks for answer. Can you give more detail on #3? Commented Dec 15, 2010 at 18:16
  • Sure, just download it, install, go to the admin > tools > search and replace > select fields (i check everything). Write the old 'something' such as 'domainame.com/test/' in the 'Replace' box and the new one in such as 'domainame.com/' in the 'with' box. Hit 'go', see the results and check your blog/site.
    – kevin
    Commented Dec 15, 2010 at 18:20
  • @Keving - OK. this step will be done after the #2 or before? Commented Dec 15, 2010 at 18:22
  • After, it's the third step.
    – kevin
    Commented Dec 15, 2010 at 18:29
  • @kevin - but if i will do #2 step than how i will run the wordpress plugin? Commented Dec 15, 2010 at 18:33
1
  1. BACKUP, BACKUP, BACKUP (of root that you are moving into, and of test you are moving from)
  2. take a look here

that's all.. pretty easy. just follow the steps in the link and nothing will be lost.

for all the data that's in your root ( http://domainname.com/ ) - just move it to another folder, or delete it all after you backed it all up. if it's all on the same server - it will all be done very quickly since it's all just local moving of files...

2
  • will i have to do something with permalinks after moving? what thing i will have to re-do after successful moving? Commented Dec 15, 2010 at 18:15
  • it's number 10. in the link I provided. you just go to administration - settings - permalinks, and click update. it should all work nicely.
    – tkit
    Commented Dec 15, 2010 at 18:26
1

You can actually just leave your files in that subfolder and follow these steps per the codex.

  1. In the general settings, change your Site Address (URL), not the Wordpress Address URL, to http://example.com/ and save.
  2. Copy (NOT MOVE!) the index.php and .htaccess files from your subdirectory into the root directory of your site.
  3. Open your root directory's index.php file in a text editor
  4. Change the line that says: require('./wp-blog-header.php'); to the following, using your directory name for the WordPress core files: require('./test/wp-blog-header.php');
  5. Login to the new location. It might now be http://example.com/wordpress/wp-admin/
  6. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can't write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)
1
  • I usually do this with my sites because I like to keep other folders and docs in the root so by keeping WP in a subfolder, I don't end up mixing everything together.
    – moettinger
    Commented Dec 15, 2010 at 20:48
1

There is a really great clone software that works as a back up and you can move the whole blog as is anywhere you want. It takes just a matter of minutes. You can get it here: https://fladlien.infusionsoft.com/go/wptwin/edakehur/

I hope that helps. I have used to move sites, back sites up, help others move sites. If you only need to move this one, it may not be for you, but if this is something you will do from time to time, it is a fantastic tool to use to move (and back up) wordpress blogs.

Not the answer you're looking for? Browse other questions tagged or ask your own question.