Change the main domain of a website on digitalocean

Asked

Viewed 281 times

0

I have a wordpress site running normally in the domain www.examples 1.com.br however I want to change the domain to www.examples (/var/www/exemplo1.com.br/public_html/) has the name of exemplo1.com.br, do I need to change the name of this folder to exemplo2.com.br? This will not hurt my website?

Obs>: I configured the server with the easyengine.

thank you.

2 answers

1

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

1 - First of all, make a backup.

2 - Sign in to Mysql,

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

See if it solves.

  • This link can help you; https://codex.wordpress.org/pt-br:Mudando_o_url_do_site

  • Yes yes this part I know I can change, the problem I configured the server using easyengine so it was all configured with the exemple1.com.br the swap part in wordpress blz but and the folder name where the file is for example q this with example 1.com.br

0

You can’t just do this by renaming. You will also need to modify the Easyengine database.

The simplest way I see of solving this problem would be:

  1. Create a new website with your new domain;
  2. wp export in the first domain, to generate an XML;
  3. wp import in the new domain, to import content;
  4. copy the plugins and the old blog theme to the new;
  5. review the new website settings;
  6. ee site delete to end the old site, when you are sure that everything is right.

Another thing I thought about later:

  1. ee site create to create the new domain;
  2. ee site info to discover the database data of the original website;
  3. same above for new site;
  4. mysqldump banco_de_dados > banco.sql of the original database;
  5. mysql banco_novo < banco.sql to restore the entire database from the original website on the new website;
  6. cd /var/www/sitenovo/htdocs ; wp search-replace dominio-antigo dominio-novo to make the settings in the database;
  7. rsync of wp-content from the original website to the new website;
  8. check everything and delete the original website.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.