Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Get Rid of /wordpress/ From Your WordPress Site URL

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Are you trying to remove /wordpress/ from your website’s URL?

Sometimes beginners install WordPress in a subdirectory, and this causes /wordpress/ to appear in their website URL, such as

In this article, we will show you how to get rid of /wordpress/ from your WordPress site URL.

Removing /wordpress/ from your WordPress site url

Note: The method shown in this tutorial also works for other subdirectories.

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

WordPress is quite easy to install, and most WordPress hosting companies offer quick WordPress installers in their hosting control panels.

However, some beginners who install their WordPress website manually may end up accidentally installing it in a subdirectory. Most often, this subdirectory is named ‘wordpress’.

This usually happens because users end up uploading the wordpress folder they find inside the official download.

Let’s take a look at how to easily fix this and get rid of /wordpress/ from your site’s URL. We will cover three methods, and you can use these links to jump to the one you want to use:

Method 1: Simply Start Over With a New WordPress Install

If you have just installed WordPress and there is no content on your website, then you can just go ahead and start over.

Simply delete the current installation and follow the instructions in our WordPress installation tutorial to properly reinstall WordPress.

If you have already added content to your website, then there are two easy ways to remove the /wordpress/ from your site’s URL. We will cover them in Methods 2 and 3.

Method 2: Change Your WordPress Site Address

If you have an established WordPress site, then this method is easier and quicker. The downside of this method is that your media files, such as images, will still use /wordpress/ in their URL.

First, you need to log in to your WordPress admin area and go to Settings » General. You will notice the ‘WordPress Address’ and ‘Site Address’ fields both will have the same URL.

You need to change the ‘Site Address’ option and point it to your root domain, e.g. and leave the ‘WordPress Address’ option as it is.

Once you do that, click on the ‘Save Changes’ button to store your settings.

Change WordPress site address

Next, you need to connect to your website using an FTP client. Once there, go to the /wordpress/ directory and download the .htaccess and index.php files to your computer.

If you are unable to locate the .htaccess file, then you may need to force your FTP client to show hidden files. If you are using Filezilla, then you need to click on Server from the menu bar and select the ‘Force showing hidden files’ option.

Show hidden files in your FTP client

Once you have downloaded both files to your computer, you need to open the index.php file in a text editor like Notepad. In this file, you will find a line like this:

require( dirname( __FILE__ ) . '/wp-blog-header.php' );

This line loads the wp-blog-header.php file, which is required to load your WordPress site.

What you need to do now is enter the correct location of the file by replacing the existing line with this one:

require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );

Save your changes and upload both index.php and .htaccess files from your desktop computer to the root of your domain using FTP.

The root folder is the parent folder with the ‘wordpress’ folder inside it, and it is usually called /www/ or /public_html/.

Root directory with a separate WordPress folder inside it

That’s all. You can now visit your website using the root domain, and everything will work fine.

However, if you need to log in to your WordPress admin, then you will still need to go to the wp-admin inside the ‘wordpress’ directory like this:

Method 3: Move WordPress to the Root Directory

This method is more comprehensive and will permanently move your WordPress site from the subdirectory to the root folder of your website.

Step 1: Create a Duplicator Package

First, you need to install and activate the Duplicator plugin on your website. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Duplicator » Settings page and then click on the ‘Create New’ button.

Create new duplicator package

This will launch the Duplicator wizard, which will create an installer package of your complete website. Click on the next button to continue.

Next, the plugin will run some scans. If everything looks good, then you can click on the ‘Build’ button at the bottom.

Build duplicator package

Duplicator will now create a package and prompt you to download it along with the installer script.

Go ahead and download both files to your computer.

Download duplicator package

Step 2: Create a New Database for a Fresh WordPress Install

You can use the existing WordPress database, but it is better to create a new one so that your old database is safe and unchanged. This way, you can revert back to your site without much fuss if something goes wrong.

You need to visit your hosting account’s cPanel dashboard, scroll down to the ‘Databases’ section, and then click on the ‘MySQL Databases’ icon.

Database cPanel

After that, simply provide a name for your database.

Next, you should click the ‘Create Database’ button.

Create database

cPanel will now create a new database for you. After that, you need to scroll down to the ‘MySQL Users’ section.

From here, you need to provide a username and password for your new database user and click on the ‘Create a User’ button.

Create MySQL user

Now, you need to assign database permissions to the new user.

Scroll down to the ‘Add User to Database’ section. Simply select the database user you created from the dropdown menu next to the ‘User’ field, then select the database. Finally, click on the ‘Add’ button.

Add user to database

Your new database is now ready to be used for the fresh WordPress installation.

Step 3: Run the Duplicator Wizard

Now, you need to upload the Duplicator archive package and the installer file you downloaded earlier to the root directory of your website.

This will be the directory containing the/wordpress/ folder.

Upload Duplicator files to the root folder of your website

After you have uploaded both files, open the installer script in a browser window. You will need to enter your site’s root URL and then prefix it with /installer.php.

This will open the Duplicator installer wizard.

Duplicator wizard

Check the terms and conditions box and then click on the ‘Next’ button to continue.

Next, it will ask you to provide the database information. Enter the information for the database we created earlier in step 2.

Connect your database

After entering the database information, click on the ‘Next’ button to continue. Duplicator will now unpack your WordPress database backup from the archive into your new database.

Next, it will ask you to update the site URL and path. You don’t need to do anything here, as it will automatically detect the new URL and path. However, if it doesn’t, then you can manually enter the details here.

New site settings

Duplicator will now finish the migration.

You will be able to click on the ‘Admin Login’ button to access your website at the new location.

Migration finished

Step 4: Set Up Subdirectory to Root Folder Redirects

Congratulations, you have successfully moved your WordPress site from the subdirectory to the root folder.

Now, it is time to set up redirects so that your users and search engines can find your website’s new location.

First, you need to connect to your WordPress site using an FTP client and then delete the old /wordpress/ folder.

Delete old wordpress subdirectory

After that, switch to the admin area of your WordPress site. Since you have moved it to the root of your website, your WordPress admin URL will be like this:

Now, you need to install and activate the Redirection plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Tools » Redirection page. The plugin will now show you a setup wizard. Simply click on the ‘Continue Setup’ and then ‘Finish Setup’ buttons.

Redirection setup

Next, you need to switch to the ‘Redirects’ tab and add your new redirect.

First, you need to check the ‘Regex’ box at the corner of the first field.

After that, go to the ‘Source URL’ field and add*Next, go to the ‘Target URL’ field and add$1.

Redirect subdirectory to root folder

Don’t forget to replace ‘’ with your own domain name. Then, make sure you click the ‘Add Redirect’ button to save your changes, and you are done.

Another tool you can use to redirect posts and pages is All in One SEO (AIOSEO). We show you how to redirect visitors using old URLs containing /wordpress/ to your new site location in our beginner’s guide on how to do full site redirects in WordPress.

Plus, you can enable 404 error tracking to catch any broken links so that you don’t lose keyword rankings.

From now on, all users trying to access your website with /wordpress/ in the URL will be automatically redirected to the correct posts with your new root URL.

Expert Guides on Changing URLs in WordPress

Now that you know how to remove /wordpress/ from your website’s URL, you may like to see some other guides related to changing URLs in WordPress.

We hope this article helped you learn how to get rid of /wordpress/ from your WordPress site URL. You may also want to see our guide on how to speed up your WordPress performance or our expert picks of the best WordPress SEO plugins and tools.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

140 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. JO says

    Thank you so much for this – it worked and as a total WP novice I can’t believe I did it myself! You’re awesome

  3. Sandip says

    Thanks so much for this. I did install WP into a subdirectory and then spent a week remaking the site so that it was installed in the root directory :( At least now I know better after reading your tutorial.

  4. Temitope says

    Hello, Thanks for the tutorial, I’m pretty new to WordPress, I did a one click install and it was a multisite installation too. The website URL and domain URL fields are’nt available under settings. Please how do I go about this on a multisite???

  5. Tobi says

    Hi, great article, the first one I found which explains this topic in a good matter.
    I have a similar problem, but a little bit more tricky. I do not know how it happened, but certainly I have done something strange at the WP installation. If I check my homepage it is actually in another extra worpress folder, that means I have WP in another WP folder, so my homepage looks like this: “”. in the filemanager in the frp client i can see in the public_html two folders of wordpress. I did not move yet the wordpress folder with the content one level up and actually eliminate the other folder, because I am worried that I will mass it up.
    Has anybody have an idea what would be the best solution? So I actually get the homepage opened under: “” and not “”?

    thanks for any good hint/solution.

  6. Brandi says

    Thank you so much for this!! I did everything you said to do, and almost everything works. There’s just one page that stopped working and is returning a 404 error page. Can you help? Thanks!

  7. Krista Hagman says

    I tried, but the space that says Website Address and site address does not exist in my General area in Settings.
    Is there another way to do it?

  8. Carolina says

    I see that several have the same problem as me, but I can not see any response to the issue.

    That is that everything seems to work fine except for:
    the home-page which is still directing to and therefore shows a 404 page.
    I did try to delete the htaccess file from the root directory and update the url-structure. it created a new htaccess file but the problem still is the same..

    Would really appreciate your response to this!
    Thank you for a great post.

    • may says

      My problem was from menu

      Try to check your URL from WP-admin —>>> appearance —>>> menu —>>> home —>>> custom link URL

  9. Anna Acenas says

    how can i remove my blog Im not a the owner of a site can i still remove my blog even im not the owner.please help me

  10. John says

    I have a question, is there something like this for Joomla? Because I couldn’t find anything on the internet.

  11. Amardeep gupta says

    First of all thanks for this article. But there is one problem stand for me.
    As I followed your step as you mention so i got Index.php but didn’t find .htaccess file.
    But i did same mean
    change ‘/wp-blog-header.php’ to ‘/wordpress/wp-blog-header.php’
    but my home page only show without /wordpress and rest of pages will show 404- error.
    please help me to slove this problem.

  12. Ashok Kumar says

    I have two domains in a single account. and so two wordpress installations in two subfolders. In this case, is it possible to move index.php and .htaccess of both sites to same root directory. If not what to do ?

    • Shady says

      You can make use of vhost go in the conf of ur webhost and do something like:

      DocumentRoot D:/webserver/htdocs/domain1
      DocumentRoot D:/webserver/htdocs/domain2

      This will make the subfolder the root for the domain you want to

  13. Anna says

    Gah! I followed the steps and it was fine. Then I went to permalinks, hit save changes and it broke! I’m getting a 500 error message! Please help me! I need to fix it! Thank you x

  14. shamsher khan says

    HI, everyone, i have an urgent query that

    my client website a news website now we want to launch Hindi and Urdu version of news so
    we decided to create a folder in


    and install wordpress

    But we want our site url should be like this:

    is this possible and if yes then how can i do it plz help

    • WPBeginner Support says

      It is possible. There are multiple ways to do this. You can consider creating a multilingual WordPress site. This will eliminate maintaining separate WordPress installs.

      You can also go installing multiple WordPress instances in separate directories for each language. You will have to setup redirects in .htaccess file.


  15. Janaina Moraes says

    Hello! Thanks for the tutorial, that’s exactly what I needed.
    However, when trying to follow the steps, I realised that I don’t have the index.php file in my /wordpress/ directory. Is that weird? I can see the .htaccess, but the index.php is not there!!!
    Can you help me please?
    Thank you so much!

    • Janaina Moraes says

      Sorry, already found it! I’ll try the steps and get you update about the results! Thanks!!!!

  16. John Woodcock says

    This worked but now the admin bar is not visible when navigating the site. One of the perks of WordPress is the ability to easily navigate and edit pages. How can I add the admin bar back to the site?

  17. Guy Riems says

    I executed al these steps and it works great except for my home-page.
    When accessing my home-page the /wordpress is still appended to the url, but the page is no longer found. All other pages are working fine.
    My first thought was to deactivate all plugins, but that didn’t help. No matter what I am doing, still getting that error.
    Any advice would be great !

    • WPBeginner Support says

      You can try these steps:

      Connect to your website using an FTP client. In the root directory you will find a .htaccess file. Download it to your computer. Delete the original file from your website. Visit your site’s admin area and go to Settings » Permalinks. Do not change any settings on the page, just click on the save changes button. Check your website to see if the error has resolved.


      • Not working says

        HI, I have followed these instrucs to the letter, too….. the home page url still loads as and I get a 404 error. Subpages work just fine, it is the home page. Tried the above suggestions but still receiving 404 error. Any other suggestions?

      • Guy Riems says

        Well, I finally found the issue why wordpress was still appended to the URL of my homepage only. In the document root there was a index.html containing a permanent redirect to
        mysite/wordpress. I am using Apache as webserver; the default search-order for Apache is index.html before index.php.

        • Karan says

          Thank you so much for pointing out the Apache issue. I too have an index.html file. How did you fix your issue ?

  18. Margaret says

    Thank you for all the great tutorials, they have been enormously helpful as a beginner to WP. On this one I have followed all the instructions to the letter but get a blank screen when making the changes. I have resorted to redirecting to /wordpress for the time being so that the site remains active. Any clues?

    • daniel says

      Hi, Dear.
      I installed wordpress using install.exe and the wordpress directory exist under the C:/xampp/apps/.
      I uploaded the source to host server.
      I uploaded my source under domainanme_dir/wordpress.
      Now I want to enter my web site using “domainname/wordpress”.
      So I followed your instructions to get rid of wordpress.
      But When I did, I saw only blank page.
      How can I solve this?

  19. Amanda says

    Thanks so much for the thorough details. Worked well, but only the second time after some investigating of the problem. My root directory had /wp not /wordpress so I had to edit the index.php file with ….
    require( dirname( __FILE__ ) . ‘/wp/wp-blog-header.php’ ); instead of
    require( dirname( __FILE__ ) . ‘/wordpress/wp-blog-header.php’ );

    Many thanks.

    • gemma says

      thanks Amanda- went through the whole process like you did with no joy, until i saw your comment- all fixed!

  20. Daisy says

    Hi, how do i add subfolders for the menus in my site. i want my menus eg the menu SHOP to have as its address

    • WPBeginner Support says

      WordPress does not have subfolders. It does have parent and child pages. For example, your shop page can have address like and it can have a child page like You can also add child items to any item in the navigation menu regardless of its content type. See our tutorial on how to add navigation menus in WordPress.


  21. Sakariyau Bolaji Abass says

    Thanks admin……but one more thing,and it’s that; i am a free wordpress user meaning that my url still has but trying to remove it as thought could not be done as the boxes to change the url were not included. Help me out please.

  22. Fabio says

    Em… I think I broke something by following this tutorial…
    Last night I did th exact steps in this article and it worked – my WP page was no longer under /wordpress but in However when I tried to login and access my dashboard this morning I got a database error saying “Error establishing a database connection”. Now I’m desperate.
    What did I do? I’ve just downloaded the htcaccess and the index.php file and edited them as you showed. To fix the problem I also tried to re-download the files, roll them back as they were (I re-set the index file to wp-blog-header) and upload them but with no luck.
    Anyone can help me understanding what I could have done?

  23. IT PETE says

    For those of you still suffering problems when you do this, don’t forget after making the changes and uploading the files back to the web server, to log into the admin area, go to “Settings” then “Permalinks” and simply hit “Save Changes” to update your Permalink Structure.

  24. Cer3bel says

    if i have a hosting acount and 5 folders with wordpress instalation inside and i have:
    how i remove from all site the subfolder from url

  25. Luciano says

    Please, help me. I’m in trouble.

    I did this procedure, step by step. I’m sure I did it as you suggest.

    Everything works… but the home page still points to my /wp subfolder.. so I get 404 error.

    I’m going mad. Two days trying to solve this.. but no success.

  26. Vivek Padhye says

    Hi, I dont want to redirect /blog/ to root. I want to access my static pages in root and use wordpress only as a blog. But I need xml sitemaps to show every pages from static pages in root to dynamic in /blog folder. Is there any way i can achieve this.?

  27. LisaT says

    my general settings only shows the site title and tagline. do not have the wordpress address or site address :( do I need to upgrade to see it??

  28. Birgitta says

    Great article, thank you. I have one question. I have done the above steps, but when I use 301-plugins they will add ‘wp’ into the url. How can I prevent this?

  29. Monica says

    Thanks so much for a great post. I hope there is still support for this even though it is about 2 months old!

    I do have one question. On my main wordpress parallax page there is no /wordpress. However, I created a new page (for a form submission) and the menu nav bar changes the link location once that new page is open.

    Normally since it is a one page parallax on the main home page it works fine, but once you go to the new page, all the buttons on the nav bar change and have a /wordpress/ gets added in between the address (and results in a 404 page error). For example But on the main home page when you click on blog the address is I made the changes mentioned above, but still can’t seem to solve the problem. What are your thoughts? Thank you in advance!

    • leo says

      Just nothing. You download index.php and .htaccess files from to WordPress installation folder. You make the correction only to the index.html file. Then you upload both files to the root folder of your site. Done.

  30. Susanna Perkins says

    For me this is just part of a normal WordPress install. I find it tidier to install wordpress in a subdirectory. I know others who do so as well. There’s nothing “accidental” about it.

    • Mitch says

      I agree Susanna! I purposefully always install WordPress to a subfolder. Keeps it cleaner that way. Especially when designing websites that are NOT WordPress driven, but WordPress is used for a only for a blog or some other specific purpose.

  31. Agustin says

    Thanks for the post it works Really good!!

    I change it on my site to it did work well, but i had problems with the translation pluguin that i installed WPML plugin to translate my site to english.

    The problem is with the plungin becouse when i change my site to the root folder and click to the translation flag it goes to the url “” but it doesnt load the translation, so i have to get back and when it loads to “” it loads the tranlated site well

    Please if you could give me any guide or help?

    Best regards

  32. Rags Hopkins says

    Thanks so much for this. I did install WP into a subdirectory and then spent a week remaking the site so that it was installed in the root directory :( At least now I know better after reading your tutorial.

  33. Steven Boocock says

    Thanks for the tutorial. I have tried to force the .HTACCESS file from filezilla but it will not show up.

    It is a new installation. When I change the to and view my site it takes me to my server home page.

    do I have to change any of the permalink structures to create the HTACCESS file.
    This issue has been a bug bear for some time now I only want people to search for

    Ta Steven

  34. Brett says

    FYI- this worked great in terms of moving everything to the root, BUT it can cause many problems with plugins… as it did for me. I had to immediately switch back due to this.

  35. Dan Carr says

    Great article!

    I have a question though… If people wanted to visit my blog index page then previously they would have had to go to . If this change was made as described in the article, would people now have to visit to see the blogs same front page?

    Would this change all the post URL from to ?

    • WPBeginner Support says

      Yes, people will be able to read your blog on the root of your domain. Yes, it will take care of Post URLs and will redirect users to correct posts on the root domain.


  36. Mindy says

    Does this mean I do not have to buy the .com from some place like godaddy? I can have a .com just by removing the word, wordpress?

    • WPBeginner Support says

      If your site is already on an address like this:, then you do not need to register another domain name you can just get rid of the wordpress and your site will be available to your readers on the main domain. i.e.


      • Ujjwal says

        Greats this works. But the problem occurs when I am trying to install Yoast plugin. When I make the changes as described above, plugin does not get installed. Please suggest.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.