Moving WordPress From A Subfolder To The Main Root Directory

Moving WordPress From A Subfolder

When it came to launching our website, one main thing we were stuck thinking about was what to write for our first blog article. This is such a big and important step for us, so the question required a lot of thought.

Then, it came to us! We were being faced with moving our new website from a testing subfolder to the main route of our website directory because it was now ready to make live to the world. We know this is a common question that many developers ask, seeing as it makes sense to put your website in a hidden subdirectory when playing about and testing things out – no one wants people to see their unfinished site.

So, that was it – this is what we decided to write about for our first article. So, here are our steps to moving WordPress from a subfolder to the main root directory of your site:

Make a Backup of your account

Before performing the following procedure, it is a good idea to make a backup of your account prior to making any changes. You can make a backup of your website files using CPanel.

Prepare your WordPress installation for the move

Prior to physically moving the files, you will need to prepare the installation to accept the new URL name.

  1. Log into your WordPress Dashboard.
  2. From the main dashboard, go to Administration -> Settings -> General.
  3. Next, look for the WordPress address (URL): and change it from (example.com/wordpress to example.com)
  4. Lastly, look for the Site Address address (URL): and change it from (example.com/wordpress to example.com)

Moving your WordPress from a subfolder to your main folder

After you have made your backup, removed the site files from the builder, and prepared your wordpress files, it is time to move your WordPress to the primary folder.

  1. Log into your cPanel admin dashboard.
  2. From the main cPanel area, look for the Files category and then click on the File Manager tool. Ensure you select the checkbox entitled ‘Show Hidden Files’.
  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 Copy 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 Copy Files button.
  6. This will copy the files up to the public_html folder. Use the File Manager to navigate back to the public_html folder. (You can do this by clicking on the Up One Level button from the toolbar across the top of the right-hand panel.)
  7. You should now see the same files as you have in your wordpress folder.
  8. You can now delete the old wordpress folder.

Log in and finish the URL details

  1. Log into your NEW WordPress admin dashboard. For example (example.com/wp-admin or example.com/wp-login.php)
  2. Go to Administration -> Settings -> Permalinks and ensure the link structure is the same as your new URL.

Michael is a successful entrepreneur with a strong background in all areas of web development, online marketing, graphic design and IT. As the current owner of Improve Position, as well as a small range of other related businesses, Michael's enthusiasm shines through with his passion to help others understand and succeed in the world of online business marketing.

Leave Us Your Comments
 

Learn About Us

We are a full service agency that deliver compelling digital marketing solutions. Our winning formula and experience helps to deliver outstanding results across several key business areas.

Request a free quote

We offer professional SEO services that can help your website increase organic search drastically and compete for 1st page rankings of highly competitive keywords.

More from our blog

See all posts