问题
Building a new website without affecting the current website (wordpress) until finished? Concerned about google web crawling, seo, ssl certificates, wordpress config, etc.
I was advised to create a new subdomain and build the new website there but I have concerns about this approach. After your build your new site (wordpress) on the newly created subdomain how do you redirect the main domain to that subdomain and not break google's web crawling or SSL certificates or anything else?
回答1:
Building and testing separately from the current site is always the best approach. A separate development environment is always preferable, if possible. This also allows you to test upgrades and changes in future before making them on the live site and risking an error.
Whether you have a separate environment or not, there are 2 ways you can build the site separately from the current site:
1. Build in a separate location and then migrate the installation to the current hosting when its ready.
This is a common approach but it is quite tricky if you try to do it manually - a common question here is how to fix a broken site after a manual migration.
My recommendation is to use a plugin that is designed to do it all for you. You can have the site moved and running perfectly in minutes without all the hassle. I use the free Duplicator plugin, but there are others.
See how to migrate a Wordpress site in 4 quick & easy steps
2. Build in a subfolder of the current website and switch it to run from the root domain
An alternative option is to build it in a sub folder (a subdomain will not work for this approach). When you're ready, it just takes a few steps to make it run from the root domain without moving anything.
Note that this is then your live site, so you don't have this as a copy for testing upgrades in future.
See how to set up WP that's installed in a subfolder so that it runs from the root domain
Finally - whichever approach you take, if your new urls are different from the current site, you should set up 301 redirects so that both your users and Google can find the corresponding pages and it doesn't hurt your Google ranking.
来源:https://stackoverflow.com/questions/62787699/building-a-new-website-without-affecting-the-current-website-wordpress-until-f