How to change a WordPress installed in the WP directory to the root directory?

 

When we perform a WordPress installation we can choose the directory in which it will be done, sometimes it runs in the default WP directory

If it is a new WordPress installation in which no change has been made in the default template, we suggest entering Softaculous app installer and select "List of Installations" in the upper right

Once we enter, we will see the existing WordPress installations and from there we can uninstall it.

To correctly perform a new installation in the root directory, we simply make sure that the field destined for the directory is empty (without WP)

 

If it is an installation in which you have made modifications and you do not want to start from scratch with a new template, we suggest the following steps:

  1. Access the cPanel of the corresponding account and click on the File Manager option
  2. Press the Configuration button (upper right corner) and make sure that the option "Show hidden files (dotfiles)" is checked. If not, check it and press the Save button
  3. Now you have to navigate to enter the directory where WordPress is installed. Once there, you have to select all the files and folders, right-click on the selected files and press the Move option. In the path, the destination directory should remain. In the case of being public_html, for example, it must remain «/ public_htm /«. Then press the Move file (s) button
  4. After the files are moved, we have to modify the database. We must go to the WordPress database from phpMyAdmin, press the table XXX_options (XXX can be any name, it is different in each installation). In the "option_value" of "home" and "siteurl" we must leave the correct URL for the site to be seen. For example, if it was "http://domain.com/wp" and we moved the site to public_html, now it should be "http://domain.com" in both fields
  5. In the site's .htaccess, make sure that the path to the index.php is correct. That is, if these lines of code are displayed:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /wp/

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /wp/index.php [L]

</IfModule>

We have to correct the third and penultimate line, so that it remains with the correct route, that is:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

 

Done!

You can contact our technicians in case of any other question.

  • Email, SSL
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Related Articles

Can I migrate a website created on Wix to Neolo?

  Wix is a company not compatible with other systems, practically it is as if Wix is the owner...

How to resolve the error "cURL error 28: Connection timed out after X milliseconds"?

The cURL is part of a software used by WordPress and other applications to send and receive data...

How do I transfer my domain outside of Neolo?

  At Neolo we work hard to get the most competitive prices in exchange for the service we...

How to create a new email account?

To create a new email account follow these steps: Log into your cPanel account Click on Email...

How to install WordPress in a temporary URL?

Many times for one reason or another we need to use temporary URLs, either because we need to...