Remove /wp directory from WordPress installation

For a fresh WordPress installation, you may always delete the existing installation and reinstall it in the correct directory.
For WordPress sites with contents, below are the steps to remove /wp directory from your WordPress installation.

* Please remember to backup your database and web files before proceeding with the steps below.
** If your WordPress site is installed on other directory (such as /wordpress), please replace "wp" with the correct directory name.


1. Login to your WordPress admin dashboard.
2. Under "Settings", click General.

3. In the "Site Address (URL)" field, remove 'wp' from the URL.
4. Click Save Changes to save the setting.
5. Login to your hosting control panel.
6. In File Manager, go to the web root (public_html/wwwroot) folder and open 'wp' folder.

7. Download .htacccess and index.php files to your local computer.
In case .htaccess file is hidden in the File Manager, go to Settings and select "Show Hidden Files", then click Save.
8. Open index.php file in a text editor application such as Notepad and find the following line.

9. Replace the existing line with the followings so that it is pointed to the correct location.

10. Save the changes.
11. Reupload both .htaccess and index.php files from your desktop to your web root (public_html/wwwroot) folder.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Change WordPress admin password

If you lost your WordPress admin password, there are 3 methods you may try to reset them.You may...

Configuration for WP Mail SMTP Plugin

Sending mail through scripts will require SMTP authentication. In order to be able to send mails...

Install WordPress using Softaculous

Softaculous is available in cPanel and DirectAdmin control panel.Please follow the steps below to...

Change and hide WordPress admin URL

There will always be brute force attack on your WordPress site no matter how strong or reliable...

How to install WordPress manually

For Linux  hosting platform inside cPanel and DirectAdmin, there is a script installer named...