Return to my portfolio

Staging CDN

Staging CDN is a WordPress plugin that i wrote in my spare time to improve my companies workflow. This was so that we could spend more time developing and less time syncing our environments.

The plugin was made to run on staging and local environments to help sync their media libraries to the live sites.


Recently I uploaded this plugin to Wordpress' Plugin repository and it was approved.

You can find my plugin at Staging CDN - Wordpress or preview the code on my Github here


Why did I feel the need to write this plugin?

One of the many issues we developers face when running multiple environments for each site is maintaining an up to date version of each environment.

We use multiple tools to to keep our sites in sync but if one of the sites we are working on does not serve its images via a CDN then we have missing images which can affect the front-end massively... Because of this we need to keep our media libraries up to date and this can be a time consuming task.

For starters we would need to do this on two separate environments. This can take a long time depending on how the live sites media library differs to your current library and what if you are creating a brand new environment with none of the images? This can take an entire day or longer!

What does it do?

This plugin is a simple plugin that finds all of the images that are output on the page and checks if the file exists locally if not then it will rewrite the image source url with the live sites url.