This guide explains how to correct the location of a WordPress installation in cPanel.
Introduction
WordPress is a content management system for creating and maintaining websites. You can install it on web hosting and customize it with themes and plugins. There are many tutorials and online resources to guide you through building a site. Learning WordPress takes practice, but its tools can help you create a site suited to your needs.
Correct a WordPress installation
Review installation details carefully, particularly the destination directory. If your site opens at https://example.com/wp, it was installed in the directory wp instead of the domain’s document root. The directory wp may be prefilled when installing WordPress through Softaculous, and you can change or clear it before installation. To move an existing installation, first back up both files and database and confirm that the target directory does not contain files you would overwrite. Then follow the appropriate migration steps:
In File Manager
Sign in to your cPanel account Open File Manager in the Files section
Click public_html, if it is the actual document root for this domain
Find and open the wp directory
Select all files, including hidden files, using Select All in the toolbar.
Click Move
In the dialog, remove the wp directory component from the destination path and click Move Files
The files are now in the destination document root. Verify that the wp directory is empty and that all required files were moved before removing it.
Update Softaculous details
In Softaculous
After moving the files, update the installation details recorded by Softaculous. Open Softaculous Apps Installer and click WordPress
Click Edit for the affected installation
Update Directory and URL to match the new location, removing the /wp component where appropriate.
Scroll down and click Save Installation Details
Update database settings
In phpMyAdmin
Update the WordPress addresses in the database if required, after preserving a backup. Return to cPanel, open Databases and click phpMyAdmin
Select the site’s database and its options table; the prefix may differ from wp_options
Find the siteurl and home rows and click Edit
Update both addresses to the new site URL and save. Then test the homepage, administration, internal links and media. Depending on the site, additional migration changes such as permalink regeneration or a serialization-aware URL replacement may be needed.
Verify the complete site rather than assuming that moving files alone finishes the migration.
Check the result and troubleshoot
The installation directory determines the final URL: a subdirectory creates a path such as /blog. Use a unique administrator password. After installation, check the public URL, wp-admin and password-recovery email delivery.
Reference documentation:
- How to install WordPress – Advanced Administration Handbook | Developer.WordPress.org
- Install WordPress using Softaculous
- WP Toolkit | cPanel & WHM Documentation
Sources accessed on October 11, 2026. Available features depend on your hosting version and options.