1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Install WordPress alongside the existing active site
This guide details how to work on a WordPress site with a development environment.
Preamble
- The process can be used at the beginning of a staging process, i.e., the creation of a new version of your live website in a development or test environment:
- This allows website owners to test features, security updates, plugins, themes, WordPress updates, and content changes without risking disruptions or issues on the live site.
- Once the tests have been completed and the changes have been validated on the staging copy, they can be deployed to production (on the live site) using automated deployment tools or by making the changes manually.
- Make your life easier! If needed, local partners referenced by Infomaniak can handle these procedures. Launch a free call for tenders. They take care of everything, freeing you from technical details.
Simple method
To install and prepare a new WordPress site with the Infomaniak installer without overwriting your current website:
1. Install WordPress in a second location
Refer to this other guide to create the new site (in parallel with the old site domain.xyz) by assigning it a domain name in the form new.domain.xyz for example and installing WordPress via Web Applications (Infomaniak WordPress installer).
At this stage, the main site (domain.xyz) remains untouched and you can quietly work on the new site new.domain.xyz. Both work in parallel.
2. Replace the old site with the new one
Once the new site is complete, you can delete the first site to reuse its domain name on the new one:
- Delete the old site to make the domain name available and reuse it.
- Add domain.xyz as an alias of
new.domain.xyz. - Reverse the alias with the main domain.
- Remove (unlink/delete)
new.domain.xyzwhich has become an alias. - As a precaution, check the main URL of the WordPress site via the Web Applications dashboard on the Infomaniak Manager, to ensure it corresponds to the new name and not to the subdomain you had chosen.
Advanced method
To work on an existing WordPress site without modifying its public version, it is recommended to proceed in 3 steps:
- Duplicate the existing site
- Work on its copy afterwards
- Modify the target directory of the production site to the directory of the production environment and modify the URLs of the pre-production site according to the domain name of the production site using a WordPress extension or via phpMyAdmin.
1. Duplicate the site to a second location
- Refer to this other guide to create the new site (in parallel with the old site
domain.xyz) by assigning it a domain name in the formnew.domain.xyzfor example and installing WordPress via Web Applications (Infomaniak WordPress installer). - Copy your existing site and paste it onto the newly created second WordPress site using a WordPress extension.
2. Edit the duplicated site
- At this stage, the main site (
domain.xyz) remains untouched and you can quietly work on the new sitenew.domain.xyz. Both work in parallel. - It is recommended to install a WordPress extension (there are dozens) dedicated to putting the second site into maintenance mode.
- If you modify the structure of your site and the URLs of your articles/pages will change, you can use a free extension like Redirection to automatically create redirects. This will prevent your visitors from encountering 404 pages while search engines re-index your site or if external sites link to your site.
3. Replace the target
- Once you have finished redesigning your site, all you have to do is modify the target directory of the production site to the directory of the production environment and modify the URLs of the pre-production site according to the domain name of the production site using an extension.
- If you are using a caching extension like WP-Rocket, W3 Total Cache, or WP Super Cache, it will be necessary to completely clear all the cache or even deactivate and then reactivate the plugin.
- If you continued to modify your production site during the redesign of your site, it will be necessary to retrieve your modifications (articles, media, pages, etc.).
- After the usual checks (missing images, incorrect links, etc.), all you have to do is deactivate the maintenance mode of your site and admire the result.