Support » Fixing WordPress » 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

    I now realise this was probably incorrect but am unsure how to go about fixing it. I have read this post –

    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

    Any assistance would be greatly appreciated

Viewing 6 replies - 1 through 6 (of 6 total)
  • 1. Contact your Web Host and ask how to point your domain to that folder.
    2. Correct the URL.

    Those are the steps.

    Thanks very much for your reply Seacoast WD

    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?



    Hi @theprimalguy

    Use Seacoast Web Design’s solution ^^ for a quick fix but that will keep your files in the /public_html/blog/ folder.

    I could technically tell you how to move the installation into the root folder but that may be too techy for you.

    As you’ve just installed the site a few days ago then you probably haven’t put a lot of data into it.

    I would recommend reinstalling it into the /public_html/ and starting again.

    If you want to know how to move the files to the root folder so that you can remove the blog folder let me know.

    I does involve making changes to the database using phpMyAdmin.


    Thanks Wil for your advice.

    I would like a more permanent solution but I have invested many hours in the site so far so don’t want to lose what I have done with installing themes, skin, plugins., widgets etc.

    I have access to phpMyAdmin so if you can talk me through it simply, I would be incredibly grateful




    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.

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

    You now need to change one file:
    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

    Remove any references to site relocation that you may have implemented from the codex link posted above.

    Files done!

    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.

    It will contain your site url along with the /blog/ reference. e.g.

    Remove the /blog/ addition so it reads:

    Go to page 2 of the wp_options table and find the home option_name. (should be around option_id 37)

    Do the same as the above step by removing /blog/ from the url.

    OK – check the front end of your site. This is the quick way. Check to see if your images load in and the sidebars are there.

    If you have images missing etc then lets do the second method.

    Make a copy of the sql file you downloaded earlier.

    Open it up in a text editor and do a search and replace for:

    Don’t use a trailing slash on both search and replace fields.

    Save the sql file.

    Go into phpMyAdmin and drop all the tables.

    Go to import and import the newly saved SQL file.

    Check your front-end site – should be OK.

    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.
    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

    I put together a slideshare for a WordPress meetup which contains most of this information:

    It’s about moving WordPress to another server but it mostly applies to moving from one folder to another too.

    Let me know how you get on. Get in touch with me through the website if you get stuck.


    Wil you’re a legend, thanks so much for your assistance. Having a few problems as per my email to you through limecanvas. Appreciate any advice


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Moving site to a different URL’ is closed to new replies.