Change main domain of a site in digitalocean

0

I have a wordpress site running normally in the domain www.example1.com but I want to change the domain to www.example2.com and I have configured the dns and everything else, but the folder that is the files of the site in the server (/var/www/exemplo1.com.br/public_html/) has the name of example1.com, do I need to change the name of this folder to example2.com? Will not that hurt my site?

Obs>: I configured the server with the easyengine .

Thank you.

    
asked by anonymous 31.03.2016 / 01:41

2 answers

2

It will give problems, WP stores the settings of your domain within the database.

1 - First of all, make a backup.

2 - Enter MySql,

3 - Search for "siteurl" in wp_options and replace the address.

See if it works.

    
31.03.2016 / 01:52
0

You can not do just renaming. You will also need to modify the EasyEngine database.

The simplest way I see to solve this problem would be:

  • Create a new site with your new domain;
  • wp export in the first domain, to generate an XML;
  • wp import in new domain to import content;
  • copy the plugins and theme from the old blog to the new
  • review new site settings;
  • ee site delete to end the old site, when you're sure it's all right.
  • Another thing I thought about later:

  • ee site create to create the new domain;
  • ee site info to discover data from the original site database;
  • the same as above for the new site;
  • mysqldump banco_de_dados > banco.sql of the original database;
  • mysql banco_novo < banco.sql to restore the entire database from the original site to the new site;
  • cd /var/www/sitenovo/htdocs ; wp search-replace dominio-antigo dominio-novo to make adjustments to the database;
  • rsync of wp-content from original site to new site
  • check everything and delete the original site.
  • 08.03.2017 / 22:33