How to remove WordPress from your site’s domain name

How to remove WordPress from your site’s domain name

It is always recommended to install WordPress in its own directory, instead of installing on the domain root (public_html) folder. Usually when you install WordPress by unzipping the downloadable wordpress.zip file, it unzips in its own folder “wordpress/”.

If you have done so and you are looking to get remove WordPress from domain name of your site, then this article explains the way to do it.

Remove WordPress from domain name with these few simple steps

Login to your WordPress site admin area.
Go to Setting >> General.
> Keep the WordPress address (URL) the full address till your WordPress directory (as in the screenshot below).
> With the Site address change the address to the URL you want (without WorrdPress in URL) (as in the screenshot below).
> After making the changes Save it.

remove-wordpress-url

Now you have to copy (2 files), the index.php and .htaccess files from the WordPress directory to the root directory. .htaccess file is a hidden file (invisible), so you may have to connect to the FTP client.  Inside FTP client enable show hidden files option to view the files. If you are using Filezilla, then you need to click on Server from the menu bar and select ‘Force Showing Hidden Files’ option.

get-rid-of-WordPress-domain

Once both files are downloaded to your Desktop, you need to open index.php file in a text editor like notepad. In this file you will find  this: require( dirname( _FILE_ ) .‘/wp-blog-header.php‘).
This line loads wp-blog-header.php file, which is required to load the front-end of 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 to the root of your domain using FTP. The root folder is the parent folder with the WordPress folder inside it usually called /www/ or /public_html/

remove-wordpress-url

Congratulations, you’ve now successfully remove WordPress from domain name of your website.

Just visit your website on your main domain, and you will see the result http://www.yourwebsite.com, WordPress will no longer appear in your domain.

However, if you need to login to your WordPress admin, then you will still need to go to the wp-admin inside the WordPress directory like this: http://www.yourwebsite.com/wordpress/wp-admin.

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.