Windows Azure Storage Plugin for WordPress Updated
Windows Azure Storage Plugin for WordPress Updated
Join the DZone community and get the full member experience.Join For Free
Learn how to migrate and modernize stateless applications and run them in a Kubernetes cluster.
Microsoft Open Technologies, Inc. (the recently-created Microsoft subsidiary charged with advancing the company’s investment in interoperability, open standards and open source) has updated the Windows Azure Storage Plugin for WordPress. The plugin functionality has not changed (it still allows you to use the Windows Azure Blob Service to store and serve media files), but under the covers the plugin is now using the “new” Windows Azure SDK for PHP. In this post, I’ll show you how get started with the plugin. If you are interested in an overview of the plugin and its architecture, see Windows Azure Storage Plugin for WordPress. If you are interested in playing with the source code, see Update Released: Windows Azure Storage Plugin for WordPress.
Note: You can down load the plugin here: Windows Azure Storage Plugin for WordPress. The download contains a User Guide that covers the details of installation and usage of the plugin. This post will get you started, but refer to the User Guide for more detail.
What does the Windows Azure Storage Plugin for WordPress do?
The Windows Azure Storage Plugin for WordPress allows you to store and serve your media files from the Windows Azure Blob Service. The Windows Azure Blob Service provides storage for binary objects in the cloud and is accessible from any platform. The service creates 3 copies of your files to protect against data loss and is works with REST conventions and standard HTTP operations to create URIs to identify and expose your files. And, depending on your site, using the Blob service may help reduce the cost of running your blog. For more information, see Pricing Details.
What do I need to use the plugin?
Assuming you have WordPress running already, you need four things to use the Windows Azure Storage Plugin for WordPress:
- A Windows Azure account. If you don’t have one, you can sign up for a 90-day free trial.
- A Windows Azure storage account.
- The Windows Azure Storage Plugin for WordPress.
How do I enable the plugin?
After you have created a container and downloaded the Windows Azure Storage Plugin for WordPress (see the section above), the steps for enabling the plugin are similar to the steps for enabling any other WordPress plugin. I’ll walk you through the steps here:
1. Extract the windows-azure-storage folder from the windows-azure-storage.zip archive and put it in your WordPress plugins directory (usually wordpress/wp-content/plugins). Note that when you unpack the .zip archive, the resulting directory is windows-azure-storage/windows-azure-storage. It is the windows-azure-storage sub-folder that you want.
2. Login to WordPress as an administrator, go to the Plugins tab on your Dashboard, and click the Activate link under Windows Azure Storage Plugin for Wordpress:
3. Under the Settings tab, click on Windows Azure. In the resulting dialog, provide your storage account name and private key and check the Use Windows Azure Storage when uploading via WordPress’ upload tab checkbox. Click Save Changes.
4. Finally, you need to select a default container for storing your media files. If your storage account does not have any containers, you will see a Create New Container dialog (otherwise the Default Storage Container dropdown will be populated with the container names in your storage account). You can create a new public container by entering a new container name and clicking Create. Then, select the default container from the Default Storage Container dropdown, and click Save Changes again.
Note: If you are creating a new container, container names can only contain letters, numbers, and dashes (-). Letters must be lowercase, and the name must be between 3 and 63 characters.
Your are now ready to use the plugin.
How do I use the plugin?
After you have enabled the plugin, when you create a new post or edit an existing post, you should see the Windows Azure icon:
Clicking the icon will open the Windows Azure Storage dialog:
From the Browse tab, you can click on an image/video/sound file to insert it into a post. From the Upload tab, you can upload files to your storage container. And, from the Search tab, you can search your storage container for files.
How do I use the plugin with Windows Azure Websites?
If you want to get started with WordPress on Windows Azure, the easiest way to go is to install WordPress on Windows Azure Web Sites from the Application Gallery. This tutorial walks you through all the steps: How to: Create a Website from the Gallery. After you have got WordPress set up, you can install the Windows Azure Storage Plugin for WordPress by doing the following:
1. Use your favorite FTP client to connect to your web site. The FTP hostname and user name are shown on your website dashboard. (See How to Manage Websites for more information.)
2. Extract the windows-azure-storage folder from the windows-azure-storage.zip archive (assuming you have downloaded it per the instructions earlier) and use your FTP client to put it in the WordPress plugins directory (wordpress/wp-content/plugins). Again, note that when you unpack the .zip archive, the resulting directory is windows-azure-storage/windows-azure-storage. It is the windows-azure-storage sub-folder that you want.
3. From your website’s dashboard, stop and start the site, then start with step 2 in the How do I enable the plugin? section above.
Note: if you are starting with a local copy of WordPress and you have the plugin already enabled, you can create a new Windows Azure Web Site with a MySQL database and deploy to it with FTP or Git. (You will, of course, have to update your wp-config.php file with the correct hostname and database connection information.)
As always, we’d love to get feedback on this plugin.
Published at DZone with permission of Brian Swan , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.