Wordpress is not recognizing them plug-in files contained in .zip upload to Azure. Can't upload themes.

John Falk 0 Reputation points
2025-02-26T22:04:38.9566667+00:00

I am trying to deploy a Wordpress theme to Azure via a zip file upload. An error message states that plug-in files can not be found. I confirmed the contained files are correct. I feel that some coding may be necessary to resolve the problem, possibly allowing recognition of the .php files.

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

1 answer

Sort by: Most helpful
  1. Bodapati Harish 820 Reputation points Microsoft External Staff Moderator
    2025-03-14T09:28:49.6233333+00:00

    Hello @John Falk ,

    First, make sure the file permissions are set correctly. If the permissions are not right, WordPress might not be able to access the files. You can adjust them by running these commands:

    sudo chown -R www-data:www-data /path/to/your/theme
    
    sudo find /path/to/your/theme -type d -exec  chmod 755 {} \;
    
    sudo find /path/to/your/theme -type f -exec  chmod 644 {} \;
    

    Next, check the folder structure of your theme. When you extract the zip file, the theme files should be directly inside the theme folder, not nested within another folder. The folder should contain files like style.css, index.php, and other necessary assets.

    If WordPress still doesn’t recognize the theme, try modifying the wp-config.php file. You can add the following line before the require_once(ABSPATH . 'wp-settings.php');

    define('FS_METHOD', 'direct')
    

    This tells WordPress to handle file operations directly without needing FTP, which can sometimes help in hosted environments like Azure.

    If uploading through the Azure portal isn’t working, you can try using the Kudu console for a manual upload. Go to your Web App’s dashboard in Azure, navigate to "Advanced Tools (Kudu)," and open it. Then, go to site/wwwroot/wp-content/themes, upload your theme zip file, and extract it there.

    It’s also important to check if your PHP version is compatible with the theme. Some themes require specific PHP versions, so you can check and update this in your Web App’s configuration settings in Azure.

    If the issue persists, looking at the error logs might provide more details. You can check the logs in the Azure portal by going to your Web App, selecting "Log stream" under "Monitoring," and reviewing any errors related to file access or theme recognition.

    As a last step, if nothing else works, try deleting the theme and re-uploading it. Sometimes, an incomplete or corrupted upload can cause issues, and starting fresh might help.

    I hope this helps!


    Please do not forget to click "Accept the answer” and Yes wherever the information provided helps you, this can be beneficial to other community members. User's image

    If you have any other questions or still running into more issues, let me know in the "comments" and I would be happy to help you.


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.