Moving site to a different URL

When I set up my WP site a few days ago, I watched a video showing me how to install it and was advised to set up a folder in the root directory called ‘blog’ and install the WP files into this folder sitting under public_html. So the URL of my site is now http://www.theprimalguy.com.au/blog

And it appears I need to move my WP core files to a new directory but I am unsure of what to do. I use the Filezilla FTP client but am a complete novice so don’t want to stuff it up. Ultimately I just need the address of my site to be http://www.theprimalguy.com.au

Once my web host has pointed the domain, do I just need to update my home and site url under settings>general or do I also need to do one of the 4 steps listed further on in that post? ie, update the wp-config.php file?

OK – the quickest way to do this is to do it in two batches; files and DB

I would zip/pack up your /blog folder just so that you have a backup in place.

I’ll assume you’re using cPanel.

Files:
Move all of your files and folders from /blog to /public_html/ using File Manager on cPanel.

You now need to change one file:
.htaccess
remove the /blog reference and save or if in doubt just delete it – WordPress will likely recreate it for you if you go into General > Permalinks and save the settings

wp-config.php
Remove any references to site relocation that you may have implemented from the codex link posted above.
i.e.
define(‘WP_SITEURL’,’http://yoursite.com’);
define(‘WP_HOME’,’http://yoursite.com’);
define(‘RELOCATE’,true);

Files done!

Database:
There are two ways of doing this. Lets try the simple approach first and see if it works for you.

1st make a backup from phpMyAdmin – export all tables and save as a SQL files on your local machine.

In phpMyAdmin, go to the wp_options table and browse the content.
On the first page you want to modify the siteurl option_name. It’s usually the first entry in the wp_options table.

Now this method can make some of your widgets disappear from the site but they should be pretty easy to recreate.

If things go pear-shaped you can always restore back.
i.e.
remove the wordpress files in the /public_html/ folder
unzip the zip in the blog folder
drop all tables in phpmyadmin
reimport the original sql file back in