How to change your WordPress Directory ( 5 STEPS) ?

In this blog we are diving into a topic that’s crucial for improving the security and organization of your site—How to change your WordPress directory. Whether you’re looking to move your WordPress installation to a new folder or simply want to clean up your server’s root directory, this guide is for you.

We’ll walk through the steps to safely and efficiently change your WordPress directory, ensuring everything runs smoothly without losing any data or breaking your site.

Reason to change the directory of your WordPress Website?

There could be several reasons why you might want to change the directory of your WordPress website:

  • Organizational Restructuring: You may need to reorganize your website’s directory structure to better align with your content organization or business objectives.
  • Improved Security: Moving your WordPress installation to a different directory can enhance security by making it harder for hackers to locate your site’s files.
  • SEO Considerations: Changing the directory structure might be necessary for search engine optimization (SEO) purposes, such as restructuring URLs for better readability or keyword optimization.
  • Server Performance: If your website experiences performance issues, relocating to a different directory on the server with better resources or configurations can improve speed and reliability.
  • Backup and Recovery: Moving your WordPress installation to a new directory can be part of a backup and recovery strategy, ensuring that your site’s files are stored in a secure location.
  • Rebranding or Redesign: As part of a rebranding or redesign effort, you might want to change your website’s directory to reflect the new brand identity or design architecture.
  • Testing and Development: Moving your WordPress site to a different directory can facilitate testing and development efforts, allowing you to work on updates or changes without affecting the live site

Steps to change your WordPress Directory

Follows these steps to change the WordPress directory.

Here I will you teach with the help of one example. In this example I have a domain called and I have installed the WordPress in directory . If you don’t know how to install WordPress in cPanel then you can follow this blog How to Install WordPress on cPanel?

For example If you have installed the WordPress in some directory and you want to change the directory. In this blog I have installed WordPress on WP directory.

WordPress Directory

Like you can see I have got this message after the installation is finished.

WordPress has been successfully installed at :
Administrative URL :

It means the WordPress is installed at WP directory , so it can only open when you type as shown in figure below.

But it is showing 404 Not Found which means nothing is installed on as you can see on figure below.

Now I want to change the directory of your WordPress Website from to

Steps to change your WordPress directory

STEP 1: Login to cPanel ->File Manager.

STEP 2: Go to Public_html there you can see your directory name in which you have installed the Word Press.

In my case I have installed it on WP directory as you see in figure below. click on that.

STEP 3: Click on Select all then click on Move.

After clicking on Move you will see your directory name delete that. You can see in the picture.

Before the WordPress Directory

After Deleting the Directory

STEP 4: Now it time to edit the .htacess file.

In this code we have to change the RewriteBase.

Before RewriteBase /wp/

After RewriteBase /

You can see on the figure below

Before editing .htacess file.

After Editing the .htacess file

STEP 5: Login to cPanel->Go to phpMyAdmin. Choose your database name that you have made while installing the WordPress. In my case it is risenepa_wp71. When you click on that you will see wpov_options.

Now when you click on that you will see

1) siteurl:

2) home:

You have to remove your directory name and click on save.

As you can see I have removed the directory name in the figure below.

“That’s it! Ta-da! Your WordPress directory has been successfully changed. For example, my site is now accessible at”


“Congratulations! You’ve successfully learned how to change your WordPress directory. By following the steps outlined in this blog, you can ensure that your website remains organized and secure. Remember, always make sure to backup your website before making any significant changes.

If you find any difficulty then you can contact us through a Support Ticket or live chat. We are there for you.

Leave a Reply

Your email address will not be published. Required fields are marked *