There is an article here about moving with changing domains:
https://wordpress.org/documentation/article/moving-wordpress/#changing-your-domain-name-and-urls
It also recommends to empty the permalinks after a move and to use a plugin like “Better Search and Replace” if necessary. With the latter you can e.g. change the old domain to the new domain.
If you use a PageBuilder like Elementor, they may also provide a tool to change the domain in their templates.
Hi, It seems that after deploying your website from the staging environment to the main site, the links on your buttons still contain the staging URL, which is causing them to direct users to the staging environment instead of the main website.
To resolve this issue, you will need to update the links on your buttons to reflect the correct URLs on the main website. Here’s what you can do:
- Access your website’s content management system or website builder.
- Locate the page where the button with the incorrect link is placed (in this case, the “LEARN MORE” button on the home page).
- Edit the button’s link and remove the “staging/1234/” portion from the URL.
Instead of “domain.com/staging/1234/about/”, it should be changed to “domain.com/about/”.
- Save the changes and publish/update the page.
- Test the button to ensure it now directs users to the correct page on the main website.
Repeat these steps for any other buttons or links that still contain the staging URL. By updating the links to reflect the correct URLs on the main website, the buttons should now direct users to the desired pages without redirecting them to the staging environment.
If you encounter any difficulties or have specific questions related to your website’s content management system or website builder, it may be helpful to consult the platform’s documentation or support resources for further assistance.