A client wanted to move his WordPress blog to a new directory. It was currently located at the root directory and now wants to move it to a new folder called blog. I was ready to charge him two hours worth of design knowing I’d have to reinstall wordpress, back up database, import and export posts. However, after searching online just to make sure that I’m not missing any steps, I learned that I can do this in about 30 minutes.
1. Backup all the wordpress core files, images folder, .htaccess, database, themes. You can download your existing WP files using any FTP software like FTPZilla or WS FTP. You can get freewares from Downloads.com.
For backing up the database, if you’re using Cpanel, just click on MySQL® Databases and scroll down until you see the phpMyAdmin link. Select the database that you used for your wordpress blog by clicking on it. Click Export from the top menus, select all tables, scroll down and check on Save as file checkbox. Hit the Go button to download a backup copy of your wordpress database. You need to do this just in case something goes wrong with the installation.
2. Now, before you do anything. Login to your current blog’s admin panel. Go to Options > General and update the following fields: WordPress address (URL) and Blog address (URL). If you’re moving to a new directory called blog, just change it from http://domain.com to http://domain.com/blog. Save the changes and proceed with the steps below.
3. Using FTP, create the new directory where you want to move your blog.
4. Upload all the core files including .htaccess to the new directory (/blog).
5. Go back to your phpMyAdmin and update the table wp_options by clicking on it. On the siteurl option_name, you should update the value to http://domain.com/blog
6. You might have to change all the paths to the images per post or if you want a shortcut version, do this. Remember the images folder that I told you to back up before? You just need to upload the whole folder to the directory /blog and it should work fine.