WordPress plugins for the cloud

WordPress Plugins for the cloudWhen I created this blog, I wanted to minimize the impact on the VM I was using by storing whatever I could outside the VM. Additionally, I was concern about the possibility to restore the blog if I ever move it. The best solution for my concerns was to take advantage of the existing WordPress plugins.

As I couldn’t find a list of recommended WordPress plugins that tackle my concerns, I’m sharing the ones that I choose.

Windows Azure Storage for WordPress

This plugin allows you to use Azure Storage Service to store your media files. This is a simple step to scale up your site without setting up the infrastructure for a content delivery. Additionally, it reduces the amount of disk space consumed as all the media files are stored externally. Moreover, storing the media files externally enables you to move the content easier.

BackWPup

Another awesome WordPress plugin that enables you to have an automatic back up of your blog content. One of the best features about this plugin is that you can store the backups in an Azure Storage account as well as in others cloud storage providers.

Disqus Comment System

Disqus, is a service and tool for web comments and discussions. One of the greatest thing about the Disqus Comment System plugin is that it enables you to reduce the amount of storage consumed in your own database. Additionally, it’s simplifies the moderating tasks avoiding some of the spam bots created for WordPress.

Google Analytics by Yoast

Whenever you are planning to scale your site, it’s important to have tools that enables you to monitor and see analytics about it. There are plenty of tools for it but a very simple one is Google Analytics. That’s where this plugin enters the game, not only adding the support for Google Analytics in your site, but also adding a dashboard to your administrator panel with all the information.

Yoast SEO

In addition to knowing your site’s metrics, you will provably like to improve the amount of visits you have. Yoast SEO plugin enables you to improve the rankings on the different search engines performing page analysis, adding meta tags for each page, adding social networks integration, generating the sitemap for your site and lot more.

AddToAny Share Buttons

Talking about improving the amount of visits to your site, you definitely need to add social networks share buttons. The AddToAny Share Buttons plugin adds lots of different networks buttons that you would like to have in your site.

SyntaxHighlighter Evolved

I’m a Software developer and one of the most important things that I will post about is code. It’s a must for me to use a syntax highlighter plugin. I choose the SyntaxHighlighter Evolved plugin, which is really simple and supports lots of different languages.


One of the best things about WordPress is the incredible big plugin ecosystem that it has. Most of them are free, adding value to your site with just a few clicks. I hope that these WordPress plugins help you creating your site.

WordPress Docker container with Compose

As I describe in my previous post, this site is running in a docker container on an Azure VM. In this post, I will explain how to configure WordPress docker container using Docker Compose.

WordPress Docker container

I wanted to deploy WordPress on my own host instead of using it as a service. In order to do this, you require a MySQL database in addition to the web host, unless you use Project Nami which enables you to use SQL Azure instead of MySQL. One option could be to use, for example, Azure App Service and a MySQL instance from ClearDB (you can find more information for this approach here).

I preferred to use another approach by taking advantage of Docker. With this approach I can have WordPress and MySQL running in separated containers in the same VM and I can add even more containers in the future at no extra cost (which is my idea).

The first step is to connect to the VM where Docker is running using ssh (if you have any questions about this, see my previous post). I wanted to use docker-compose to set up the environment, which is an orchestration tool that makes spinning up multi-container applications effortless. In a new folder (e.g. /home/user/dev/), create a new file named docker-compose.yml.

In the docker-compose.yml file, add the MySQL container based on the official mysql image under a configuration which I named db (you can choose any name instead of db). Additionally, set up the root password for MySQL specifying the MYSQL_ROOT_PASSWORD environment variable. The following snippet shows how the docker-compose file should looks like at this point.

db:
  image: mysql
  environment:
    MYSQL_ROOT_PASSWORD: YourWordPressPasswordHere

Now, add the WordPress container based on the official wordpress image, adding the link to the mysql container by specifying the name of the configuration under links as it’s shown in the following code snippet.

web:
  image: wordpress
  links:
    - db:mysql

Now, add the expose configuration under the WordPress container configuration (i. e. the web entry) to be able to access port 80 from the outside. Note that you could map the port to any other just by specifying “OutsidePort:80” (remember to use the double quotes).

web:
  image: wordpress
  links:
    - db:mysql
  expose:
    - "80"

This is enough for having the WordPress Docker container up and running, but there is another interesting thing to do before starting the containers. You can expose the wp-content folder in order to easily update themes, or other content from WordPress to the VM where docker is running. In order to do this, you will need to configure the working_dir and map the volumes as it’s performed below.

web:
  image: wordpress
  links:
    - db:mysql
  expose:
    - "80"
  working_dir: /var/www/html
  volumes:
    - "/pathInVM/wp-content:/var/www/html/wp-content"

The final version of the docker-compose.yml file should look similar to the following one:

web:
  image: wordpress
  links:
    - db:mysql
  expose:
    - "80"
  working_dir: /var/www/html
  volumes:
    - "/pathInVM/wp-content:/var/www/html/wp-content"

db:
  image: mysql
  environment:
    MYSQL_ROOT_PASSWORD: W0rdpressPassw0rd!

Once you have everything ready, save the changes to the file and execute docker-compose up to start both containers and try accessing the site which should be running in port 80. And that’s it, you have configured WordPress Docker container.