1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Install WordPress alongside the already 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, that is, the creation of a new version of your live website, in a development or testing 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 conducted and the changes have been validated on the staging copy, it is possible to deploy them to production (on the live site) using automated deployment tools or by making the changes manually.
- For additional help contact a partner or launch a free tender — also discover the role of the host.
Simple method
To install and set up 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 of 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 calmly work on the new site new.domain.xyz
. Both function in parallel.
2. Replace the old site with the new one
Once the new site is complete, you can delete the first site in order to reuse its domain name for the new one:
- Delete the old site to make the domain name available and reuse it.
- Add domain.xyz as an alias for
new.domain.xyz
. - Reverse the alias with the main domain.
- Remove (unlink/delete)
new.domain.xyz
which 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 matches the new name, and not 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
- Change the target directory of the production site to the production environment directory 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 form ofnew.domain.xyz
for example and installing WordPress via the Applications Web (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 calmly work on the new sitenew.domain.xyz
. Both function in parallel. - It is recommended to install a WordPress extension (there are dozens available) dedicated to putting the second site into maintenance mode.
- If you modify the structure of your site and the URLs of your articles/pages 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 reindex your site or if external sites link to your site.
3. Replace the target
- When you have finished redesigning your site, all you have to do is change the target directory of the production site to the production environment directory and change the URLs of the pre-production site according to the domain name of the production site using a plugin.
- 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 disable and then reactivate the plugin.
- If you continued to modify your site in production during the site overhaul, it will be necessary to retrieve your modifications (articles, media, pages, etc.).
- After the usual checks (missing images, broken links, etc.), all you have to do is disable the maintenance mode of your site and admire the result.