We installed the Apache Web server, on which operates websites in PHP. We need to automate changes to files between production and test environments.
Whenever there is a change in the website, the following procedure: Accepting the request for modification, copying the production environment to the test, waiting for the acceptance of changes in the test environment and copying the changes in a test environment to productive operation.
If we do this process manually, it will cost us a lot of time wasted. Moreover, we could make mistakes that could cause failure of productive operation.
In this case, a document tree is set to /www. It splits into:
Write a script that will have two options:
Files index.php and project.php includes the production URL: www.domain.com. These two files of production lines the change each URL to test.domain.com. During the change control these two files ignore (do not write them as amended).
For solving the problem follow these steps:
We prepared for you video course Marian's BASH Video Training: Mastering Unix Shell, if you would like to get much more information.
Thank you. Marian Knezek