Windows Azure install/update errors.

Windows Azure is PHP on IIS but it's surprisingly fast and reliable except for permission errors when updating plugins etc. It would be really cool if you guys could look into this and create a plugin to assist with these issues. I know, I know... we don't recommend hosting in Azure but we are MS Partners and the ability to host free dev sites is a big money saver for us as a startup. I'd be glad to provide more info regarding the errors as I have taken a deep dive and spoken with some Azure/Wordpress engineers/technet bloggers.

  • Mahdi

    It seems to a pretty well documented problem but it's related to updating plugins. It also affects the WPMUDEV dashboard plugin install and upgrade. The problem appears to be related to directory permissions and replacing files. The fix procedure for us has been to manually delete the plugin directories and manually copy the latest plugin via FTP then restart the site in Azure's management panel.

    Here is a link discussing the issue (as per a wordpress update but also applies to plugins)

    Ours complaints are similar to this:
    PHP Warning: copy(C:disappointed:DWASFiles/Sites/[site]/VirtualDirectory0/site/wwwroot/index.php): failed to open stream: Permission denied in C:\DWASFiles\Sites[site]\VirtualDirectory0\site\wwwroot\wp-admin\includes\class??-wp-filesystem-direct.php on line 200

    Below is the conversation I had with the TechNet Azure/Wordpress blogger:

    Thanks again for the info Alex. Very Informative. It would be great if there was a place to keep track of these bugs/issues seeing as how Azure is including Wordpress in it's Gallery store.

    I found the following fix and was going to attempt to deploy it on a dev site. What's your opinion on this potential fix?


    On Dec 15, 2013, at 4:14 PM, Alex Melching <> wrote:

    That was the old issue with PHP on Windows Azure v1.0 before they did a huge update to Azure in late 2012 and added PHP versions 5.4 and 5.5. Plus, we don’t have access to those files anyway, being server side files. It was really bad. This new issue comes straight down to directory permissions, regardless of rules listed in web.config. Have been working with the Windows Azure Team to fix. It also doesn’t help that WordPress doesn’t consider updating code for IIS. But, things look promising in major release of WP v4.0.

    From: Mahdi Hedhli []
    Sent: Saturday, December 14, 2013 11:46 AM
    To: Alex Melching
    Subject: Re: Azure Wordpress

    Thanks for the in depth explanation. I am familiar with LAMP vs PHP in IIS and I've read about some seemingly clunky fixes for the permissions issues in the user.ini as well as updates to php_wincache.dll and including it in the php.ini file.

    We're trying to keep our hosting in one place, keep costs down, and as we are MS partners already using Azure, hosting the production site there made sense. I just want to make sure we use a supported/best practice resolution going forward.

    I'm actually quite surprised at how well PHP runs in IIS on Azure as I've had some nightmare moments in the past myself.

    Anyhow, thanks again. I'll follow your site and feel free to follow ours:


    Sent from my iPhone

    On Dec 14, 2013, at 11:14 AM, Alex Melching <> wrote:


    Thanks for sending me an email about our guide. Yes, we have noticed that there is an issue with WordPress update to 3.7.1 on Windows Azure. I have sent many messages to the Windows Azure Team to correct the issue.

    Here's the problem. When you perform the update to WordPress 3.7.1 on Windows Azure, there are core files that do not get updated during the update because of read/write permissions that Windows Azure has in place. Since we are unable to modify those backend settings, this will continue to happen. This affects the folder that contains the CSS stylesheets for plugins and themes. So, when you go to update a plugin or theme, even though the update completes, it states that files are missing or incomplete.

    Here's the trick to fix the problem. Go to and download the plugin/theme. Unzip them. Use a FTP client and FTP to your Windows Azure WordPress site. Navigate to the appropriate directory and then upload the fresh downloaded plugin/theme and overwrite the current directory. If you are not sure how to do this, please let me know and I will explain in more detail.

    WordPress 3.8 is was just released and I just tested while composing this email. I did not encounter any issues during the update to 3.8, but only one of my plugins failed to update after. The others updated without issue. I'll investigate the one plugin that did not update which is the Better WP Security plugin.

    Also, keep in mind that Windows Azure uses IIS as its hosting platform whereas most other providers use an OpenSource platform such as Linux. There are different files that are used for each platform. Especially when it comes to read/write permissions. IIS uses the web.config file where Linux uses .htaccess.

    Feel free to follow us at our websites and and our social media feeds.

    Please let me know if you encounter any other issues.



    -----Original Message-----
    From: mhedhli []
    Sent: Friday, December 13, 2013 9:34 PM
    To: Alex Melching
    Subject: Azure Wordpress
    Followed your guide and have installed wordpress on many different webhosting providers but for some reason on Azure... my plugin updates always fail. It's a well documented issue but I haven't found a definitive answer.

    Any ideas?

  • Alexander

    Hi @Mahdi,

    I apologize for the delay here. I've taken a look, and this would be related to the WordPress filesystem API.

    WordPress uses the "direct" file system method by default. Usually this is the best choice.

    However, you do have a few other options. I'd recommend trying to override the default using the available wp-config.php constants. Take a look at this:

    FTP would probably be the best thing to try first. Here's a sample config for that.

    define( 'FS_METHOD', 'ftpext' );
    define( 'FTP_BASE', '/path/to/wordpress/' );
    define( 'FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/' );
    define( 'FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/' );
    define( 'FTP_USER', 'username' );
    define( 'FTP_PASS', 'password' );
    define( 'FTP_HOST', '' );
    define( 'FTP_SSL', false );

    This will tell WordPress to connect over FTP to do any file management rather than use the native access.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.