wp-change-domain


/ Published in: PHP
Save to your folder(s)

Before moving on to the site migration, make sure that the new domain is parked for hosting. To do this simply: go to your new domain and if a message appears that the site has not been launched yet, then everything is fine. If nothing will open at all, then you incorrectly rewrote the NS of the domain server (changing the NS servers takes from 4 to 24 hours), or forgot to add (park) the new domain to the hosting. If the domain is successfully parked, then follow the instructions:

We will move all the files from the old site to the new one to the folder where the site should be located (via FTP / hosting control panel);
We go to the old hosting and dump the database (export, via phpMyAdmin);
We pass to a new hosting, we fill our database (import, via phpMyAdmin);
We configure the connection to the new database (file wp-config.php);
Upload the file change-domain.php, unpack it and upload it to our new domain in the root folder;
In the browser, go to the link http: //vash_site/change-domain.php (make sure the connection to the database is correct);
We check the correctness of entering the domain names and click the "Change" button. You do not need to close the page.
If everything was done correctly, then the site should be launched and all links should be rewritten to new ones.

URL: https://github.com/Helsingin-kaupungin-tietokeskus/wordpress/blob/master/wp-change-domain.php

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.