A Step-by-Step Guide to Removing ‘wordpress’ from Your WordPress Site URL**

Date:

Share post:

**How to Remove “/wordpress” from Your WordPress Site URL**

If you have accidentally ended up with “/wordpress” in your website’s URL after installing WordPress in a subdirectory, there’s no need to panic. In this article, we will walk you through three simple methods to remove “/wordpress” from your WordPress site URL.

## Method 1: Reinstall WordPress

If you have just installed WordPress and have not added any content yet, starting over is the easiest way to remove “/wordpress”. Follow these steps:

1. Delete your current WordPress installation.
2. Refer to our WordPress installation tutorial to reinstall WordPress correctly.

## Method 2: Change Site Address

If you have already added content to your website, you can follow this method to remove “/wordpress” from your site URL. Here’s what you need to do:

1. Log in to your WordPress admin area.
2. Proceed to Settings » General.
3. Under “WordPress Address” and “Site Address,” you will find the same URL. Change the “Site Address” to your root domain (e.g., http://www.example.com) and leave the “WordPress Address” as is.
4. Click “Save Changes” to save your new settings.

Next, connect to your website using an FTP client and follow these steps:

1. Navigate to the “/wordpress/” directory and download the “.htaccess” and “index.php” files to your computer.
2. If you cannot locate the “.htaccess” file, ensure that your FTP client is set to show hidden files.
3. Open the “index.php” file in a text editor like Notepad.
4. Look for the line that loads the “wp-blog-header.php” file and replace it with the correct location of the file.
5. Save your changes and upload both files to the root of your domain using FTP.

Now, when you visit your website using the root domain, you will notice that “/wordpress” is no longer a part of your URL. However, if you need to access your WordPress admin, you will still have to go to “wp-admin” inside the “wordpress” directory.

## Method 3: Move WordPress Site to Root Folder

This method involves permanently moving your WordPress site from the subdirectory to the root folder of your website. Follow the steps below:

**Step 1: Create a Duplicator Package**

1. Install and activate the Duplicator plugin on your website.
2. Go to the Duplicator » Settings page and click the “Create New” button.
3. Follow the provided instructions to create an installer package of your entire website.
4. Download the package and the installer script to your computer.

**Step 2: Create a New Database**

It is recommended to create a new database for the fresh WordPress installation. Here’s what you need to do:

1. Access your hosting account’s cPanel dashboard.
2. Scroll down to the “Databases” section and click the “MySQL Databases” icon.
3. Provide a name for your new database and click the “Create Database” button.
4. In the “MySQL Users” section, create a new username and password for your database user.
5. Assign database permissions to the new user.

**Step 3: Run the Duplicator Wizard**

1. Upload the Duplicator archive package and the installer file to the root directory of your website.
2. Open the installer script in a browser and enter your site’s root URL prefixed with “/installer.php”.
3. Follow the instructions provided by the Duplicator installer wizard to provide the necessary database information and update the site URL and path.
4. Allow Duplicator to complete the migration, and then click the “Admin Login” button to access your website at the new location.

**Step 4: Set Up Redirects**

To ensure that users and search engines can find your website’s new location, set up redirects using an FTP client and the Redirection plugin:

1. Delete the old “/wordpress/” folder from your FTP client.
2. Install and activate the Redirection plugin.
3. Go to Tools » Redirection and follow the setup wizard.
4. Add a new redirect with the source URL as “https://example.com/wordpress/.*” and the target URL as “https://example.com/$1” (replace “example.com” with your domain).
5. Click the “Add Redirect” button to save your changes.

By following these steps, you can successfully remove “/wordpress” from your WordPress site URL and ensure a smooth transition for your visitors. For more WordPress tips and tricks, check out our YouTube Channel for video tutorials, and don’t forget to follow us on Twitter and Facebook.

Subscribe to our newsletter

Stay ahead of the game! Subscribe to our newsletter for exclusive tips and insights on Data Structures & Algorithms and interview preparation.

Leave a Reply

Related articles

10 Effective Growth Hacking Techniques to Boost Your Online Influence**

The Influence of Online Power: 10 Techniques for Boosting Growth In today's digital world, having a strong online presence...

Boost Your Productivity with Checklists: An Essential Tool for Every Blogger and Marketer

The Power of Using Checklists: Enhancing Your Efficiency as a Blogger or Marketer In the fast-paced world we live...

Convert Webpages to PDFs: A Simple Guide**

Finding an easy and reliable way to convert webpages to PDF files can be a daunting task. Many...

Mastering Freelance Success: Key Tips for Building a Thriving Career

Keys to Creating a Successful Freelance Business: Essential Strategies and Techniques Introduction: Flourishing in the Freelance Economy As the gig...