wordpress settings URL
|

How To Move A WordPress Website From A Subfolder (To Root)

wordpress settings URL

Want to move your WordPress website from a subfolder to the root folder under public_html? There are many times when you might want to work on developing a WordPress website in a subfolder under the domain such as “wp” or “beta” or “dev.” The URL for the WP website would look something like yourdomain.com/dev.

There is also the possibility you installed WordPress accidentally under a subfolder. Many hosting services offer a quick WP installation button, or you may have used the Installatron application through cPanel. The quick installation allows you to customize some of the settings such as username/password, title, and admin email address. But, it can be easy to miss the directory where WP is going to be installed.

Luckily, it’s not that difficult to move WordPress to different folders. And, because the database (stored on separate server) does not rely on the URL, all you have to deal with is the WP Settings and File Manager (also accessible through Terminal and FTP apps). By the way, this method is reversible. Meaning, if you decide to move your WP files out of the public_html root folder, this method can also work.

  1. Go to your WordPress CMS Settings > General Settings
  2. Change the WordPress Address and Site Address to your desired location. Click Save.
  3. Don’t try to log-in again when it says there is an error (you just changed the URL!)
  4. Go to your hosting cPanel > File Manager (or Terminal or SFTP if you prefer)
  5. Open the folder where all the WP files are and Select All
  6. Click on Move and choose the root public_html folder
  7. Now return to your original browser and type in yourname.com/wp-admin to log in
  8. Check to see if all your Pages, Posts, and Media are working correctly
WordPress-site URL remove sub-folder
#2. Remove the subfolder were the WP website presently exists so there is just https://yourdomain.com/
cpanel file manager root public HTML wp folder
#4. This is an example of where your current WP files may exist (in the “wp” folder. You want to move them out.
cpanel file manager move files
#5. Right-click on the selected files in File Manager (all the files in the folder) and move them up to public_html
gamzreview site URL
#7. Finally, go to yourdomain.com/wp-admin to log-in to the WP CMS.

That’s it! Be sure to make sure everything is working correctly. Because there is no change in directory structure within the WordPress organization, there shouldn’t be any issues with internal links. However, any inbound (external) links to your website will no longer work. If you have an online resume or social media account pointing to your old WP URL, those will have to be updated. Other inbound links that you cannot control will have to be redirected in the .htaccess file at the root of your website.

Advanced: There is also a way to have your website run under the main domain URL but with the WP files in a sub-folder. But, the setup is a bit more complicated depending on the permalinks and directory structure you might be going for.

Similar Posts