After applying for a new domain name, the website content and database can be directly backed up and restored using the old website. However, due to the change in domain name, the new website address will display garbled characters when opened.
This is because the content in the database is still the old website. Just change the domain name. Assume that the old domain name is aaa.com and the new domain name is bbb.com. Use phpMyAdmin to open the database, copy this code, replace aaa.com with your old domain name, bbb.com with your new domain name, and execute go:
| SQL |
UPDATE wp_options SET option_value = replace(option_value, 'aaa.com', 'bbb.com') WHERE option_name = 'home' OR option_name = 'siteurl'; |