Use the Microsoft Azure Storage service to host your website's media files.
This WordPress plugin allows you to use Microsoft Azure Storage Service to host your media and uploads for your WordPress powered website. Microsoft Azure Storage is an effective way to infinitely scale storage of your site and leverage Azure's global infrastructure.
For more details on Microsoft Azure Storage, please visit the Microsoft Azure website.
For more details on configuring a Microsoft Azure Storage account and on using the plugin with the Block Editor or Classic Editor, please visit the user guide.
- PHP 8.0+ (For PHP 7.4 support you need to use 4.3.5)
- WordPress 6.4+
- Upload the plugin files to the
/wp-content/plugins/windows-azure-storage
directory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the 'Plugins' screen in WordPress.
- Use the Settings->Microsoft Azure screen to configure the plugin.
For multisites or to enforce Azure Blob Storage settings, you can define the following constants in wp-config.php:
- MICROSOFT_AZURE_ACCOUNT_NAME - Account Name
- MICROSOFT_AZURE_ACCOUNT_KEY - Account Primary Access Key
- MICROSOFT_AZURE_CONTAINER - Azure Blob Container
- MICROSOFT_AZURE_CNAME - Domain: must start with http(s)://
- MICROSOFT_AZURE_USE_FOR_DEFAULT_UPLOAD - boolean (default false)
- MICROSOFT_AZURE_OVERRIDE_CONTAINER_PATH - Override Container name in the Image URL , can be just "/" See Settings->Microsoft Azure for more information.
Storage accounts can be created via CLI, classic Azure portal, or the new Azure portal, with varying results.
If a Storage account is created with the new Azure portal, authentication will fail, resulting in the inability to view/add containers or files. Creating a Storage account with the Azure CLI should allow the plugin to work with new Storage accounts.
Images uploaded to the Azure Storage service will not automatically receive responsive versions. Images added through the WordPress Media Loader should get automatically converted to responsive images when inserted into a post or page. We are investigating options for full support of responsive images in the plugin.
Media editing tools are currently not working. The edited images are not uploaded to Azure Storage. Will be fixed in future releases.
At the moment, changing the Azure Storage account (and blob URLs) requires to manually update data in the WordPress database.
Data should be updated in these tables:
wp_options
(orwp-config.php
or Settings > Microsoft Azure): plugin settingswp_posts
:
- links in
post_content
of pages and posts (rows withpost_type
=page
orpost
) guid
of rows withpost_type
=attachment
wp_postmeta
:meta_value
of rows withmeta_key
=_wp_attachment_metadata
orwindows_azure_storage_info
Note: data in wp_postmeta
is PHP serialized, it cannot be updated with simple search-and-replace. There are multiple ways to do it:
- Using WP-CLI, detailed instructions here.
- Directly inside WordPress, using the Better Search Replace plugin.
- Using an external tool that supports PHP serialization, like Search Replace DB.
Stable: 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.
A complete listing of all notable changes to Microsoft Azure Storage are documented in CHANGELOG.md.
Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a listing of maintainers of, contributors to, and libraries used by Microsoft Azure Storage.