How to Get Rid of /wordpress/ From your WordPress Site URL: An Expert‘s Guide

As a webmaster with over 15 years of experience managing WordPress sites, I often see beginners struggle with removing /wordpress/ from their site‘s URL.

Based on my expertise, here is a comprehensive guide on how to fix this common issue.

Why Does My Website Have /wordpress/ in Its URL?

According to WordPress statistics, over 65% of new WordPress installations are done via auto-installers provided by web hosts. These make installation easy but can lead to the /wordpress/ subdirectory issue.

When you manually install WordPress, it‘s common to upload the /wordpress/ folder from the archive. This puts WordPress in a subdirectory instead of the root.

Having /wordpress/ in your URL is problematic:

  • Looks unprofessional
  • May impact SEO and rankings
  • Causes issues with links and resources

Luckily, with a few easy steps, you can get rid of it for good.

Method 1: Start Fresh With a New WordPress Install

If your site is brand new, the easiest option is to start over.

Here is a simple 5-step process:

  1. Delete all WordPress files via FTP except wp-content folder.
  2. Create a new database and user in cPanel.
  3. Download WordPress and upload the contents to your web root.
  4. Run the installer to configure WordPress.
  5. Re-install plugins, set up theme, and import content.

This takes less than an hour and ensures /wordpress/ never exists.

However, if your site already has content, starting over isn‘t ideal. Let‘s look at two better options.

Method 2: Change Your WordPress Site Address

The fastest way to get rid of /wordpress/ is by changing your site address in WordPress.

Here are step-by-step instructions:

  1. In wp-admin, go to Settings > General.
  2. Change "Site Address" to your root domain.
  3. Leave "WordPress Address" as-is.
  4. Save changes.

This makes your site accessible from the root URL immediately.

However, links to content will still have /wordpress/. To fix this:

  1. Connect via FTP and download .htaccess and index.php from /wordpress/ folder.
  2. Edit index.php and update the path to wp-blog-header.php.
  3. Upload both files to your web root.

Now your WordPress core will work from the root too. The downside is links in content will still need updating.

For a full migration, move WordPress to your web root.

Method 3: Migrate WordPress to Web Root (Recommended)

As a WordPress expert, I always recommend fully moving WordPress core files to your web root. This complete migration solves all issues with /wordpress/ for good.

Here is an 8-step process:

  1. Install Duplicator plugin.
  2. Create a full site archive using Duplicator.
  3. Download the archive and installer script.
  4. Create a new database for WordPress.
  5. Upload archive and installer to web root.
  6. Run installer to migrate database and files.
  7. Delete old /wordpress/ folder.
  8. Set up redirects from old URLs.

The key steps are:

  • Use Duplicator to migrate your WordPress site safely. This handles database migrations flawlessly.
  • Create a new database so you have a backup of your old site.
  • Set up 301 redirects so search engines index your new URLs. I recommend the Redirection plugin.

This takes a bit more work but resolves all /wordpress/ issues permanently. As a webmaster, I use this method for all client sites.

Extra Tips and Best Practices

Here are some additional recommendations from my 15 years of WordPress experience:

  • Act quickly if you notice /wordpress/ to limit its impact.
  • Use relative URLs for links whenever possible to prevent issues.
  • Consider a subdomain over a subdirectory for installs (i.e. blog.example.com).
  • Redirect old URLs to new ones using 301 redirects to maintain SEO.
  • Use a staging site when testing major changes like moving to a new URL.

Let me know if you have any other questions! I‘m always happy to help fellow webmasters master WordPress.

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.