Redirect My Entire Domain URL Call Subfolder to Root Directory


If my website using WordPress CMS Programming and installed in a subfolder already.Now I want to configure and it up to display on the root domain using simple htaccess file .

Example that Basically, displays the contents of changable path).

I need to redirect that entire subfolder (folder and all contents) back to the root – e.g. point to

My Questions Like Bellow-

1) WordPress installation in a folder in the root, like in /subdirectory
2) Wp admin is accessible via
3) Site opens in root folder like:

Just Follow Few Simple Steps:

Step #1:

To change permalinks, there should creates or needs a .htaccess file

Step #2:

Copy /subdirectory/index.php to /index.php, so to the root directory of your site hosting

Edit the index.php like it –

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . ‘/subdirectory/wp-blog-header.php’ );

Step #3:

Edit /.htaccess and keep it root directory

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /subdirectory/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory/index.php [L]
# END WordPress

Step #4:

WordPress settings:

Go to the wordpress admin, and find out settings > general

edit the following two fields

WordPress Address:
Site address: