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

cPanel File Manager

Click public_html, if it is the actual document root for this domain

public_html selected in cPanel File Manager

Find and open the wp directory

WordPress installation directory in File Manager

Select all files, including hidden files, using Select All in the toolbar.

Hosting files listed in cPanel

Click Move

Website files in cPanel File Manager

In the dialog, remove the wp directory component from the destination path and click Move Files

Hosting directories and files in cPanel

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

WordPress management in cPanel

Click Edit for the affected installation

Editing WordPress installation settings

Update Directory and URL to match the new location, removing the /wp component where appropriate.

Editing WordPress site settings

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

Accessing phpMyAdmin in the cPanel Databases section

Select the site’s database and its options table; the prefix may differ from wp_options

wp_options table in the WordPress database

Find the siteurl and home rows and click Edit

Editing entries in the options table in phpMyAdmin

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.

Share

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:

Sources accessed on October 11, 2026. Available features depend on your hosting version and options.