When adding a deployment slot in wordpress as an app installation, my wp-content is not being copied and hence all my plugins are not installed even though I am cloning the settings . What can be the potential reason ?

Mohit Gupta 20 Reputation points
2025-01-19T11:24:35.2+00:00

When adding a deployment slot in wordpress as an app installation, my wp-content is not being copied and hence all my plugins are not installed even though I am cloning the settings . What can be the potential reason and the fix for it ?

I have a wordpress site which is deployed as an app. I am creating a clone of the database and creating a deployment slot and attaching it to the cloned database, but it is throwing error that it is not able to find the theme . When checking the wp-content, I see that none of the themes and plugins are installed. What is the reason and fix for it ?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,317 questions
{count} votes

Accepted answer
  1. Shree Hima Bindu Maganti 3,130 Reputation points Microsoft Vendor
    2025-01-20T05:53:48.8166667+00:00

    Hi Mohit Gupta ,
    Welcome to the Microsoft Q&A Platform!
    When creating a deployment slot for a WordPress app in Azure App Service, the wp-content folder (containing themes, plugins, and uploads) is not copied, even when cloning settings. This results in missing themes and plugins.
    The main root cause

    • Deployment slots clone configuration settings but do not clone the file system by default.
    • The wp-content directory is part of the app's file system and must be explicitly copied.
    • Each slot has an isolated file system unless shared storage is configured.
      You can cross check with these steps:
    • Offload wp-content/uploads to Azure Blob Storage using plugins like "Microsoft Azure Storage for WordPress".
    • Access the app's file system via Kudu Console, FTP, or Azure Storage Explorer.
    • Copy the wp-content directory from the original app to the new slot.
    • Create a script to copy the wp-content directory during slot creation.
    • Use CI/CD pipelines to handle syncing automatically.
    • Include wp-content in your repository or deployment pipeline to ensure it is deployed with the app.
    • Manually copy additional plugins/themes installed after deployment.
    • Test the slot against the production slot’s wp-content during a swap.
      After making changes, verify that
    • The wp-content folder exists in the deployment slot.
    • The database is correctly pointing to the cloned deployment slot.
    • The necessary plugins and themes are active without errors.
    • Use the WordPress debug log (wp-config.php) to confirm no missing files are referenced.
      ref link:https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots?tabs=portal
      https://learn.microsoft.com/en-us/azure/storage/blobs/blob-upload-function-trigger?tabs=azure-portal
      https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp?tabs=portal
      By implementing one of these fixes, you can ensure that your WordPress deployment slot has access to the wp-content directory and functions as expected.
      Let mi know if you have any assistances.
      If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.