Here Are 2 Quick Ways to Move WordPress Site to Root: A Beginner’s Guide

Bulletproof Backups for Your WordPress Website

Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.

move wordpress site to root

Ready to move WordPress site to root from a subdirectory, but worried about breaking it or losing SEO rankings? Even with the best migration checklist, things can go wrong if the right steps aren’t followed.

Using a subdirectory for staging was smart, but leaving it there can cause duplicate content issues that confuse Google. This can hurt your SEO and expose an unfinished site to visitors.

Moving your site is simpler and safer than you think. With two easy methods to choose from, this guide will help you safely move your WordPress site to the root in 30 minutes without losing traffic.

TL;DR: Easily move your WordPress site to the root using a plugin like Migrate Guru or manually. Make sure that you always start with a complete backup of your site using a backup plugin to ensure your site’s safety during migration.

When migrating your WordPress site, choosing the right method is crucial. You can opt for an automated plugin for ease or handle the process manually for more control. Either way, you need to take essential safety measures to protect your site before starting.

Pre-move checklist (Non-negotiable)

Nobody wants to break their website during a migration. The difference between a smooth move and a disaster comes down to preparation. 

These four steps aren’t optional. They’re your safety net.

Backup everything. Take a complete backup of your site before touching anything. This includes all your files and your database. If something goes wrong, you can restore everything exactly as it was.

BlogVault backups

Disable caching. Disable any caching plugins before you start. During migration, this creates conflicts that can break your site or make changes invisible.

Enable maintenance mode. Put up a maintenance message for visitors while you work. This prevents customers from seeing a broken site or, worse, encountering errors during the checkout process.

This step is critical for WooCommerce site. You don’t want someone trying to buy something while you’re moving files around.

Maintenance mode on WordPress

Record your current settings. Write down your current WordPress Address and Site Address from SettingsGeneral. Also, save a copy of your .htaccess file if it contains custom code.

A) Use a plugin to move WordPress site to root

The plugin route eliminates technical headaches. Migrate Guru handles everything automatically—no coding, no file transfers, no broken links to fix afterward.

Why we recommend this method:

  • Zero technical skills required
  • Automatic redirects preserve your SEO
  • All internal links update automatically
  • Migration runs on powerful external servers
  • Handles sites up to 100GB

Step 1: Install Migrate Guru on both locations. Navigate to your current subdirectory site. Go to PluginsAdd New, and search for Migrate Guru. Once you find it, click Install and then Activate. Next, go to your root directory site and repeat the process.

Migrate guru plugin

Step 2: Copy your migration key. On your root directory site, click on Migrate Guru from your left panel. Click on the drop-down under Migration Key and copy the unique code that appears. You’ll need this in the next step.

Migration key Migrate guru

Step 3: Start the migration from your subdirectory site. Go to your subdirectory site and navigate to Migrate Guru. Enter your email, and click on Migrate. You’ll see a list of hosting providers. Select yours from the list. If you can’t find your host, select Other Hosts.

Select the host you are migrating to Migrate Guru

Step 4: Enter your migration key and migrate. Paste the migration key you copied earlier. Click Migrate.

Paste migration key from destination site

The migration typically takes a few minutes, depending on the size of your site. You’ll receive an email when it’s complete.

Migrate process Migrate Guru

Your subdirectory has now been moved to the root directory, and all links should be working correctly.

B) Manually move WordPress site to root

If you prefer full control, the manual method gives you complete visibility. You can either use cPanel’s File Manager or FTP. For this article, we’ll use FTP via FileZilla.

Step 1: Connect to your site. Open FileZilla and enter your FTP credentials (get these from your hosting provider) to connect to your server.

FileZilla connect to site files

Step 2: Clear your root directory. Navigate to your root directory (usually called public_html or www). Select all existing files and delete them. This step takes time but ensures a clean migration.

Delete contents of root folder

Step 3: Move files from subdirectory to root. Navigate to your subdirectory where WordPress is currently installed. Select all files, including the hidden .htaccess file (you may need to enable show hidden files in FileZilla). Drag these files to your root directory and drop them there. Alternatively, you can cut the files and paste them into the root directory.

Move files to root

Step 4: Update your WordPress URLs. Navigate to your WordPress admin area at SettingsGeneral. Change both your URLs (WordPress Address and Site Address) to your root (https://yourdomain.com). Once done, click Save Changes.

WordPress Address and Site Address change

Step 5: Set up redirects for SEO. Open your .htaccess file in the root directory. You’ll need to add redirect rules and restore any custom settings you saved earlier.

First, add this code ABOVE the existing WordPress rules:

Redirect 301 /subdirectory/ https://yourdomain.com/

Replace subdirectory with your actual subfolder name. This ensures visitors and search engines find your content at the new location.

Step 6: Restore your custom rules. If you saved any custom .htaccess rules during the pre-move checklist, add them back now. Place these custom rules below your redirect rule and above the default WordPress rules.

Your site should now load from the root directory with proper SEO redirects and all your original custom configurations in place.

Post-move checklist

You’ve completed the migration, but now comes the moment of truth. Does everything work? Run through these checks to make sure your site is functioning properly. Especially if you have taken the manual approach.

Clear your cache first. Before testing anything, clear all caches. This includes any caching plugins you have and your browser cache. 

Clear cache

Test your site thoroughly. Visit your homepage to make sure it loads correctly. Don’t just glance. Click around and ensure that everything looks right.

Verify your redirects work. This step is crucial for keeping your SEO intact. Type your old URL format into your browser: yourdomain.com/subdirectory/some-post

It should automatically redirect to: yourdomain.com/some-post

Update your permalinks. Go to WordPress AdminSettingsPermalinks. Don’t change any settings. Just click Save Changes.

This refreshes WordPress’s URL structure so it knows where everything is located in the new root directory. Think of it as telling WordPress to relearn your site’s layout.

Permalinks WordPress

Monitor for the next 48 hours. Keep an eye on your site for the next day or two. Check Google Analytics to make sure traffic flows normally.

Watch for any error reports or user complaints about broken functionality.

Turn off maintenance mode. If you enabled maintenance mode earlier, don’t forget to disable it so visitors can reassess your site.

Disable maintenance

Troubleshooting common errors

Don’t panic if something isn’t working right after your migration. These issues are normal and fixable. Most problems have simple solutions that take just a few minutes.

A blank white page instead of your website

You visit your site and see nothing but the white screen of death.

This occurs when WordPress gets confused about the location of the files after the move. Save your permalinks again.

Go to your WordPress dashboard → SettingsPermalinks. Don’t change anything, just click Save Changes. This tells WordPress to refresh its memory about your site structure.

Missing or broken images

You see empty boxes where photos should be, or images that won’t load at all.

Your images are still looking for files in the old subfolder location.

Install the Better Search Replace plugin from your WordPress dashboard. Use it to replace your old folder path with your new root path. The plugin will automatically detect and repair all these broken image links.

The website keeps redirecting in circles

Your page keeps refreshing endlessly, or your browser shows too many redirects error.

Your website is getting confused about which address to use—the old one or the new one.

Turn off all plugins temporarily. Visit your site again. If the issue resolves, clear the cache and re-enable the plugins one by one to identify the problem.

Database connection error

You see an error message instead of your website, stating, error establishing a database connection.

First, check your wp-config.php file to ensure the database credentials are correct, including the database name, username, password, and host. If the credentials don’t match, correct them in your wp-config.php file, then save and refresh your site.

Parting thoughts

You’ve got everything you need for a successful migration. For speed and safety, Migrate Guru is an excellent choice as it automates tasks such as link updates and redirects. Always start with a complete backup. You can use it to restore your site if anything goes wrong.

Every day, thousands of non-technical users successfully move WordPress sites using these methods, so you’re not doing anything risky or unusual. Be sure to complete the post-move tasks to ensure your migration is fully successful. With these steps, you can confidently transition your site with ease.

FAQs

How do I transfer my entire WordPress site?

To transfer your entire WordPress site, use a plugin like Migrate Guru. This tool helps you move your complete WordPress site, including site files and database, making migration straightforward. Just follow the instructions to upload and install on the new server.

How to migrate a WordPress site to local?

To migrate a WordPress site to local, use tools like XAMPP or MAMP to set up a local server environment. Export your site’s database and files, and import them into your local setup using tools like phpMyAdmin. Update your wp-config.php file with local database credentials.

What is the root path of a WordPress site?

The root path of a WordPress site is the main directory where WordPress is installed. This is typically the public_html or www directory on your server, accessible via FTP or your hosting control panel.

How do I export a complete WordPress site?

To export a complete WordPress site, you can use plugins like Migrate Guru for a seamless process. Additionally, you can use the built-in WordPress Export feature to export your site’s content into an XML file. This includes posts, pages, and media content. For your database, use phpMyAdmin to export it as an SQL file, ensuring you have a comprehensive backup of all your site data.

Tags:

You may also like


How do you update and backup your website?

Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.

Updating Everything Manually?

But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.

Backup Your WordPress Site

Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.