To move WordPress installed on your Hosting VPS to a different directory within the same hosting account, for example to move it from www.ejemplo.com/wordpress to www.ejemplo.com, you need to follow a series of steps to ensure that the page displays correctly.
- The first thing you need to do is create a backup of the site so that you have a backup copy in case you need to undo any failure or error that may arise. Although moving a WordPress site to a different directory does not usually cause too many problems, it is good practice to always make a backup before performing any major action on your site.
- The next step is to specify in the WordPress panel itself which directory it will be in. To do this, you need to go to the section “Opciones” -> “Opciones Generales” and, from there, change the addresses shown in “Dirección de WordPress ( URL ) y Dirección del blog ( URL )“, which are usually the same address, to the new WordPress location. In other words, if it was previously www.ejemplo.com/wordpress and you want it to be in the root of your hosting account, you will need to enter www.ejemplo.com. Once you make this change, the page will not be visible, since the page will not be visible until you move all the WordPress files and directories to the new directory.
- Once all the content has been copied to the new address, you need to make one final change to ensure that images display correctly and articles work. To do this, you will need to go to the “Misceláneas” section within the options and change the option “Guardar los archivos subidos en esta carpeta” by removing the old directory where WordPress was previously located.
Once these changes have been made, you should be able to view without any problems your WordPress site in its new location.