How do I move WordPress from a sub directory to the root directory

March 06, 2017

Most website creators using WordPress today to create website. You can easily build and manage your  site with WordPress. When you convert your  your existing business website(.html / .php/ .aspx files)  to wordpress, it’s a good idea to set up a blog and test a new version in a subfolder (example.com/WordPress) so that it does not affect their main domain.  Once completed, you can move the new site over to the root directory for the domain.

This tutorial assumes you have already created, tested your site in a subfolder called “wordpress”. Refer following articles if you need help on how to install wordpress.

  1. How To Install WordPress on the Best WordPress Hosting Providers
  2. How to install a WordPress blog in 1and1?
  3. How To Install WordPress Using Fantastico

Now let us see how to move your site to root.

Step1: Change site URL

  1. Log into your WordPress Admin, go to  Settings -> General.
  2. Change WordPress address (URI) from (example.com/WordPress to example.com)
  3. Change Site Address address (URL) from (example.com/WordPress to example.com)

Step2: Physically move the files from a sub folder to your main folder

Before moving the wordpress files to root, take a backup of your site in root folder. After you have made your backup, it is time to move your WordPress to the primary folder. You can use the cPanel File manager, an FTP program, Shell using SSH, or  HTML editor like DreamWeaver.

Moving Files Using Cpanel

  1. Log into your cPanel  dashboard.
  2. From the main cPanel area, look for the Files category and then click on the File Manager tool.
  3. Once inside the File Manager, you will want to navigate to the folder you have the WordPress site in. (For example, a folder named WordPress.)
  4. You will see a list of all the WordPress files and folders in the right hand panel. Highlight them all and click on the Move File icon from the menu toolbar across the top of the page.
  5. A popup will appear so you can enter the destination folder. Continuing with our WordPress folder example, it should show as public_html/WordPress. Remove the /WordPress from the destination path so that it simply displays as public_html. Click the Move Files button.
  6. This will move the files up to the public_html folder. You should now see the same files as you have in your WordPress folder.
  7. You can now delete the old WordPress folder.

Moving Files Using FTP

Open your FTP program. Select files from “WordPress ” folder.Drag files to root folder.

Your site is ready now.