Reputation: 5266
How do I setup production/staging slots for Wordpress for Azure App Service? I am completely at sea.
I have my WordPress site running in the production slot. Everything is working fine. Now I want to setup a staging slot so that I can experiment with various changes.
I clone the production slot and I discover that the cloned staging slot is simply an empty WordPress installation. None of my plugins or themes are installed. What is going on? How can this possibly work?
I am used to Pressidium which has production and staging environments for WordPress. You copy production to staging. Modify staging and then copy staging to production. Works great!
I am also used to production and staging slots in Azure. You deploy code via GitHub actions or similar to the staging slot. When you are ready you swap the production and staging slots. Works great!
How do you do this for WordPress on Azure App Service?
Upvotes: 1
Views: 807
Reputation: 8215
In order for the Azure Wordpress app to get deployed in the deployment slot properly, Refer my SO answer here.
Step 1:-
While creating the slot make sure you clone the settings
of you Production App for your staging app to load properly by selecting the Production app like below:-
Created Staging slot and cloned the settings of the app running in the Production slot:-
This will make sure the Database and other settings from Production Slot is added to the Staging slot correctly:-
As you are using Github Actions, You can also refer the Steps outlined in this Document- wordpress-linux-appservice/WordPress/wordpress_azure_StageDeployments.md at main · Azure/wordpress-linux-appservice (github.com) > To Configure Deployment Slots in Wordpress deployment to App Service correctly.
Also, After you create a Staging Slot by cloning the settings from Production Slot, You can visit the Staging Slot and configure Github Action workflow via Deployment Center separately for Staging slot and separately for Production Slot.
My output:-
Production Slot:-
Staging Slot:-
Also Refer my SO answer here to resolve the deployment slot issues for the Wordpress App. and 1) Edit your wp-config.php according to my answer. 2) Change your wp-content folder permissions accoridng to my answer
Upvotes: 0