Are you looking to create your very own Scalable optimized WordPress Site/blog using Azure MySQL, Azure Storage and Azure CDN, then this post series is for you?
I have divided the series into below parts:
- Getting Azure Subscription, Creating App Service Plan and WordPress Web Service using My SQL In App
- Connecting Word Press website with WordPress.com and Installing and configuring Jet Pack
- Creating Azure Database for MySQL and exporting the Data from My SQL In App to Azure Database for MySQL Server, Handling Security and Optimizing with persistent connection
- Creating Azure Storage Account and configuring WordPress to use Azure Storage to store media files and Optimizing with persistent connection.
- Configuring Custom domain, SSL Certificates.
- Configuring Azure CDN, configuring back up scheduling in azure and Auto Scaling
- How to use REDIS CACHE with WORDPRESS on Azure
- How to install application insights in WordPress on Azure
If you are not following along please check the previous part 1 first.
4.Creating Azure Storage Account and configuring WordPress to use Azure Storage to store media files and Optimizing with persistent connection.
At this point, your site is connected with WordPress.com now we are moving to part , which is Creating Azure Storage Account and configuring WordPress to use Azure Storage to store media files and Optimizing with persistent connection.
Let us go to https://Portal.Azure.com/
To enable Azure Storage for WordPress media files, it is required to have Azure Storage Account first, let us create Azure Storage Account:
Go to “New”, “Storage” and click on “Storage account – blob, file, table, queue”.
1 Azure Portal
Now fill the information, and make sure to select appropriate performance for storage, as we will implement CDN later, “Standard” performance tier will be enough for now. Please make sure to choose the Location as of your WordPress Web Service, this will increase the performance since both Web service and storage account will be on same data center.
2 Create Azure Storage Account
After deployment is completed. Go to Storage account and check it should be like below screen.
3 Create Blob storage
Go to your Site admin panel, if you do not see your admin panel go to {Your Website}/admin.
Now go back to your WordPress site, “Plugins”, choose “Add New”, search for “Azure Storage”, and select “Windows Azure Storage for WordPress”
4 Windows Azure Storage for WordPress
Activate the feature; your screen should look like below:
5 Installed Windows Azure Storage for WordPress
Let us configure it with our Azure Storage Account. We will create a new blob container in the and make sure to select “Public access level” to “Container (anonymous read access for containers and blobs)”
6 Create New Blog Container
Now note down the “Storage account” and “Primary blob service endpoint”, we will use them in integration with WordPress.
7 Blog Container Created
Also, click on “Access Keys” and get “key1”.
8 Copy Access Key
Now go back to WordPress site, go to “Settings”, “Windows Azure” and fill the information as below and click save.
9 Configure Windows Azure Storage for WordPress
Note that after saving, it will automatically populate “Default Storage Container”, also check “Use Windows Azure Storage for default upload” and “Keep local files” are checked.
The “Keep local files” will give you flexibility in back up of the site as media files will on same storage as your WordPress Site, if you have, huge files you can un-check this option as Azure Storage Account back up your files to three locally redundant disks and if you want to move from Azure to other hosting you may need to copy the files from Azure storage if you un-check this option.
10 Save the Configuration
At this time, we are ready to upload our files to azure, let us try it.
Go to your Site admin panel, if you do not see your admin panel go to {Your Website}/admin
11 Upload Media to Azure Storage
Now drag and drop a picture or select files to upload. After upload click on the Picture to see its URL, it should have URL of your Storage Account endpoint.
12 Uploaded Successfully.
We can also verify this by going to our Storage Account and see the file.
13 Verify on Azure Storage
Now just one last extension is remaining to persist the connection to Database, go to “Plugins”, search for “Persistent database connection” and choose as shown below:
14 Install for Persistent database connection
Install this plugin and activate it and that is set.
Congratulations! You have setup WordPress to work with Azure Storage Account.
Upcoming next Configuring Custom domain, SSL Certificates.
6 thoughts on “Creating Azure Storage Account and configuring WordPress to use Azure Storage to store media files and Optimizing with persistent connection: PART 4”