How does Azure override MySQL connection string in php application?

I know that Azure uses some runtime magic to override the connection string for my .NET applications. However, I am trying to migrate through the Wordpress blog, and it looks like the connection information is stored in the wp-config.php file. If I enter the correct values ​​for the blog into this file, then everything will be fine, but I want to deploy github from the public repository. How can I exclude connection information from wp-config.php and let azure override it at runtime?

+4
source share
1 answer

If your repository is not private, you will need to save the wp-config.php file in your Windows Azure instance (or load it after the fact in some way). Then, when the files are pulled into this directory from Github, wp-config.php (assuming the wp-config.php file is not in the repo), the file will already contain connection information.

If you have a private Github repository, then it is probably safe to leave the file and wp-config.php values ​​in the repository itself, since only the users to whom you provide access to the repo can see it.

+2
source

Source: https://habr.com/ru/post/1435353/


All Articles