<>
Article Final and easy guide to transferring a WordPress site describes in detail all the steps to follow to transfer a WordPress installation from one hosting service to another.
In this article, despite everything, we stop at another case study, in which we want to transfer the contents de WordPress de un domain a otro.
In this circumstance, after transferring all the content from the old site, you should cambiar la dirección dirección url de la página de inicio y el Blog original.
4 ways to modify, edit or change urls in WordPress
I decided to write this article because I found myself in a situation where, after transferring the content de un sitio a un nuevo dominio, seguía viendo el viejo grito….. En retrospectiva, para alcanzar mi target, habría tenido que seguir el primer procedimiento, el que estoy a punto de describir.
1) Modify the home urls and siteurl through access to the control panel
NOTA: ESTE PROCEDIMIENTO HARÁ QUE TU SITIO YA NO BE ACCESIBLE. VAS A TENER QUE COMPLETAR EL PROCEDIMIENTO PARA RESTAURARLO. In practice, before the transfer, you would have had to access the control panel of the old domain, go to Settings -> General and change the fields WordPress Address (URL) and Site Address (URL):
Management panel section where to set the URL address of the domain
Instead of the settings you see, you should have put the ones you can see in the image below:
As you can see, I have replaced the old address www.vecchiodominio.it with the new one, www.nuevodominio.es.
The address www.nuevodominio.es will be the one where I decided to install the current content.
The site title and email address can be left or changed, the substance does not change.
After entering these new values, simply click the button Save Changes.
Just a few moments and your site will no longer be visible!
But don't panic, complete the transfer from the current installation to the new domain (as explained in this guide) and everything will work amazingly.
2) Modify the urls using phpMyAdmin (the method I prefer)
This is my preferred method. In fact, through phpMyAdmin I can change the url of the main page in less than 5 minutes and have full control over the site.
Para continuar debe sacceder al panel de control del dominio (Plesk, cPanel o semejante) y hacer clic en el nombre de la base de datos.
Then open the database in question through the service phpMyAdmin to have in front of you a screen similar to the one below:
Database view via phpMyAdmin
Now you have to find the table that contains the information you want to change. To do this, simply type the option in the search field. This is what you are going to see:
Option table
Now click on wp_options, you should see this situation
Here are the tables for editing the WordPress url
Ahora, todo lo que tienes que hacer es hacer clic en el link Editar de las dos líneas en cuestión (siterul y home) e insertar la nueva dirección dirección url.
Once you have saved your changes, you will have completed the operation.
3) Modify the urls through wp-config.php
This procedure at the same time is extremely simple.
In this circumstance you only need tener acceso vía ftp to your directory (the one with WordPress installed) and locate the wp-config.php file.
Once have you found the file and you have opened it with a text editor, you will have to enter the following code:
define(‘WP_HOME’,’http://www.nuevodominio.es’); define(‘WP_SITEURL’,’http://www.nuevodominio.es’);
Estas dos líneas simplemente deben ser insertadas después de la línea de inicio <?php.
What you should see, then, is something like:
<?php
define ('WP_HOME', 'http: //www.newdomain.es'); define ('WP_SITEURL', 'http: //www.newdomain.es');
Made this change, save the file and the new settings in the home url will be active.
Of course, you can delete this configuration once you have access to the control panel. There you can edit the siteurl and homemade screams again.
4) Modify the urls through WP-CLI
Have you heard of WP-CLI?
It is an interface that provides a kind of command line pTo configure and modify WordPress settings.
It's a feature for true geeks!
For this reason at the same time it can be very dangerous.
Básicamente posibilita al Username enviar comandos como los siguientes:
wp option update home 'http://www.newdomain.es' wp option update siteurl' http://www.newdomain.es »
The commands you just saw are just the commands that via the WP-CLI interface They allow you to modify the url address of the house and the siteurl according to your needs.