It’s a common situation: WordPress was installed in a subfolder like /wordpress or /blog, so your site lives at yourdomain.com/wordpress when you want it at yourdomain.com. Moving it to the root is straightforward if you follow the steps in order.
The clean method: change the address settings
WordPress has a built-in way to serve the site from the root while keeping the files in the subfolder — which avoids moving anything and is the least error-prone approach.
- In WordPress, go to Settings → General.
- Leave WordPress Address (URL) pointing at the subfolder (e.g.
https://yourdomain.com/wordpress). - Change Site Address (URL) to the root (
https://yourdomain.com). - Save.
Copy the index file to the root
Now copy the index.php file from the subfolder up to your site root (public_html). Open the copied file and edit the last line so it points into the subfolder:
require __DIR__ . '/wordpress/wp-blog-header.php';
Adjust /wordpress/ to match your actual subfolder name. Also copy .htaccess to the root if it isn’t already there.
Re-save your permalinks
Log in (you may need to use the subfolder wp-admin URL) and go to Settings → Permalinks → Save to refresh the rewrite rules for the new root address.
Update internal links and set redirects
Run a search-and-replace on the database to update any hard-coded subfolder URLs to the root. Then add 301 redirects from the old /wordpress/ URLs to the root equivalents, so anyone with old bookmarks — and search engines — follow along without hitting a 404.
Test everything
Visit the root domain and confirm the site loads there. Check internal links, images and the login page. Clear any caching plugin and your browser cache so you’re not seeing an old version.
Back up before you start, as always. If you’d rather not juggle index files and redirects, this is a quick job for our team — just open a ticket.