How to Remove /wordpress/ from Your WordPress Site’s URL

Introduction:

Table of Contents

Why You Need to Clean Up Your WordPress URL

Having /wordpress/ in your website’s URL (like yourdomain.com/wordpress/) doesn’t just look messy—it also affects your branding, user trust, and search engine rankings. Many beginners unknowingly install WordPress in a subdirectory instead of the root folder, resulting in such unwanted URLs.

In this comprehensive guide, we’ll show you how to remove /wordpress/ from your WordPress site’s URL properly. Whether you’re starting a new site or fixing an existing one, these steps will help you move WordPress from a subdirectory to your root domain, optimize your URL structure, and improve your site’s SEO.

What Causes the /wordpress/ in Your URL?

Installing WordPress in a Subdirectory

When installing WordPress, some users choose or default to installing it in a subdirectory named /wordpress/ instead of the root domain. So instead of https://yourdomain.com, the website ends up being accessible at https://yourdomain.com/wordpress/.

While this might work functionally, it’s not ideal for branding, navigation, or SEO.

Benefits of Removing /wordpress/ from Your URL

  • Professional URL Structure: yourdomain.com looks cleaner and more professional than yourdomain.com/wordpress/.
  • Improved SEO Performance: Shorter, root-based URLs tend to rank better.
  • Better User Experience: Clean URLs are easier to remember and share.
  • Enhanced Trust: People are more inclined to click on a root domain because they trust it.

Step-by-Step Guide to Remove /wordpress/ from Your Site’s URL

Here’s how to safely move your WordPress website from a subdirectory to the root folder.

Back Your WordPress Site First

Before making any major changes, create a full backup of your website. This guarantees that in the event of an issue, you can recover your website.

Recommended Backup Tools:

  • UpdraftPlus
  • Duplicator
  • All-in-One WP Migration

 Move WordPress Files from /wordpress/ to Root Directory

Step 1: Access Your Hosting File Manager or Use FTP

Use cPanel’s File Manager or an FTP client like FileZilla to access your site’s files.

Step 2: Locate the /wordpress/ Folder

Navigate to the /public_html/wordpress/ directory.

Step 3: Copy All Files to Root

Copy all files and folders from /wordpress/ to /public_html/. Avoid moving them—copy first, test, and then delete the /wordpress/ folder once you’re sure everything works.

Update WordPress URL Settings

Step 4: Change Site URL in WordPress Dashboard

Before moving the files or after, log in to your dashboard:

  • Go to Settings > General

Update the WordPress Address (URL) and Site Address (URL) to arduino CopyEdit: https://yourdomain.com

  • Click Save Changes

If you can’t access the admin panel after moving files, manually change the URL in the wp-config.php file:

php

Copy

define(‘WP_HOME’,’https://yourdomain.com’);

define(‘WP_SITEURL’,’https://yourdomain.com’);

Fix Permalinks and .htaccess

After moving your files and updating URLs:

Step 5: Update Permalink Settings

  • Go to Settings > Permalinks 
  • Click Save Changes (even without changing anything)

This regenerates your .htaccess file to work with the new structure.

Step 6: Clean .htaccess Manually (Optional)

Make sure the .htaccess in your root folder contains default WordPress rewrite rules:

apache

Copy

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase

RewriteRule ^index\.php $ – [L]

RewriteCond %{REQUEST_FILENAME} ! -f

RewriteCond %{REQUEST_FILENAME} ! -d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

Redirect Old URLs to Avoid 404 Errors

Step 7: Use Redirection Plugin or .htaccess

To redirect traffic from /wordpress/ to the root, you can:

Option 1: Use a Plugin

Install and configure the Redirection plugin.

Option 2: Add a Redirect Rule in .htaccess:

apache

Copy

RedirectMatch 301 ^/wordpress/(.*) $ https://yourdomain.com/$1

This ensures old URLs redirect to the correct new locations, preserving SEO value.

Update Internal Links and Media URLs

After the move:

  • Look for any internal links pointing to /wordpress/ in your content.
  • Update image or media file URLs if necessary
  • Use Better Search Replace plugin to change yourdomain.com/wordpress/ to yourdomain.com/

 Clear Cache and Test Everything

Step 8: Clear Cache

  • Clear any plugin caches (like WP Super Cache or W3 Total Cache)
  • Clear browser cache

Step 9: Test Your Website

  • Visit multiple pages
  • Check if links and media load properly
  • Verify redirection from old URLs to new ones

 Additional Tips for a Smooth WordPress URL Transition

Use a Maintenance Mode Plugin

Before starting the URL cleanup process, it’s a good idea to enable a “Coming Soon” or “Maintenance Mode” screen. This keeps your users from seeing a broken site while you’re working on changes.

Recommended plugins:

  • SeedProd
  • WP Maintenance Mode
  • Coming Soon Page & Maintenance Mode by CMP

Use a CDN or SSL? Update Settings

If your site uses a CDN (like Cloudflare) or has an SSL certificate, be sure to update the settings in those services to reflect the new root domain URL. Your CDN may cache the old /wordpress/ path, which could result in errors.

 Common Mistakes When Removing /wordpress/ from URLs

Knowing what not to do can save you from unnecessary downtime. Here are common errors to avoid:

1. Moving Instead of Copying WordPress Files

If you cut and paste instead of copying the files from /wordpress/ to the root, your site might break during the process. Always copy first, test everything, and only delete the /wordpress/ folder when you’re sure the site works.

2. Forgetting to Update Site URLs Before Moving

Many users move their files but forget to update the site address in WordPress settings, resulting in broken links or access issues. Always update the WordPress address and site address before or immediately after the move.

3. Not Setting Up Proper Redirects

Without redirects, your visitors (and Google) will hit 404 pages when accessing the old /wordpress/ URLs. This damages SEO and user experience. Always set up a 301 redirect from /wordpress/ to the root domain.

 FAQs—Fixing WordPress URLs and Paths

Q1: Can I install WordPress in the root folder directly in the future?

Yes! When setting up a new site, always install WordPress in the /public_html/ or root directory to avoid this issue entirely.

Q2: Will changing my WordPress URL affect my SEO?

If done correctly and proper 301 redirects are set, your SEO should not suffer. In fact, a cleaner root domain can improve SEO in the long run.

Q3: What if I get a “Too Many Redirects” error?

This usually means something is wrong with your .htaccess rules or site URLs. Clear your browser cache, check for duplicate redirect rules, and double-check your wp-config.php for hardcoded URLs.

Q4: Should I notify Google or submit my website again?

It’s a good idea to resubmit your sitemap to Google Search Console once your structure changes. This ensures Google reindexes your updated URLs faster.

Final Wrap-Up: Clean Up Your WordPress Site for a Stronger Web Presence

Removing /wordpress/ from your site’s URL is a small but critical step in WordPress site optimization. It sharpens your domain identity, boosts user trust, and allows search engines to better index your content. By following the guide above, you not only improve SEO but also take full control of your site’s URL structure.

To summarize:

  • Back up your site
  • Copy files from the subdirectory to root
  • Update URLs in WordPress
  • Fix permalinks and redirects
  • Clean up internal links and test everything

Whether you’re a beginner or an experienced developer, cleaning your site’s URL structure is one of the most powerful changes you can make to build authority, trust, and visibility online.

Now that your WordPress site lives on the root domain, you’re set up for success. Enjoy your cleaner, faster, and SEO-friendly website!

 conclusion:

Bid farewell to WordPress and welcome to clean URLs.

Cleaning up your WordPress URL structure by removing /wordpress/ not only enhances your site’s appearance but also boosts SEO and improves user trust. While it may seem technical, following these steps carefully makes the process smooth and safe.

Whether you’re launching a new site or correcting an older installation mistake, taking the time to move your WordPress installation to the root domain is worth the effort. Always back up your site first, follow best practices, and keep SEO in mind when making changes.

Now your WordPress website looks more professional, loads from the root domain, and gives users and search engines a better experience.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.