How to Remove /wordpress/ from Your WordPress Blog URL

By on October 23rd, 2015

While installing the WordPress platform is usually a very quick and simple procedure, many first timers end up installing it into a sub directory so that their website URL looks like this: yourblog.com/wordpress/. If your blog is installed in such a manner and your website only contains a blog rather than other components as well, you should ideally change this so that people will always be able to access your blog simply by visiting your domain. This guide takes a look at how to change your WordPress installation as easily as possible.

 

  1. Log in to your WordPress administrator dashboard and navigate to Settings > General. In the Site Address (URL) field, remove /wordpress/ so that only the domain itself remains.
  2. Using an FTP client, log in to your Web server. Your hosting company will likely provide their own Web-based FTP client which you will be able to access from your account page. Alternatively, you can use an installable FTP client such as FileZilla.
  3. Browse to your /wordpress/ directory and download the index.php and .htaccess files. The latter may be hidden, in which case you will need to configure your FTP client to display hidden files.
  4. Open index.php in Notepad and locate the following line:

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

    Replace this line with the following:

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

    Save your changes and close the file.

  5. Upload both files to the root directory of your FTP server. They should share the folder with the WordPress folder. Overwrite the existing index.php file if required.

 

People will now be able to visit your WordPress blog simply by entering the domain. However, when you want to log in to your administrator dashboard, you will still need to visit the original URL including the /wordpress/ part.

2 Responses to “How to Remove /wordpress/ from Your WordPress Blog URL”

  1. Marc says:

    What is the reason to download .htaccess and not make any changes to it

  2. Hwanyong LEE says:

    Oh please change ‘/wordpress/wp-blog-header.php’ to ‘/wordpress/wp-blog-header.php’. quotation mark in your page make trouble when copy and paste for they are unicode

Leave a Reply