Something on my Blog help you out? Buy me a coffee!
Blog of a Developer turned SysAdmin

Ngrok Integration for DesktopServer

When I am doing local WordPress development, I use DesktopServer from ServerPress.  It helps that I know the guys that built the product, but it wasn’t without faults.

Many of the issues that I ran into before (like PHP 5.5) have been addressed since the guys at ServerPress started doing more frequent updates, but there was still a fly in my pudding in regards to my work flow.  For me to show a client things I was working on, I had to take the time to deploy to the staging space.

This isn’t bad in theory, but can take time, especially if it is a large site or requires a lot of tweaking to work correctly on the client’s host.  That is valuable time lost.

One of the guys from DesktopServer pointed me into the direction of Ngrok, which worked after enabling a plugin and following directions.  I ended up having to fork one of the plugins and fix, because it was causing errors with modern PHP and WordPress.

Quick aside, Ngrok allows you to tunnel through your local firewall and allow someone to access resources on your local system.

Well, that brought me one step closer to a good work flow with customers, but I felt there was more I could do.

In the end, I ended up writing a plugin for DesktopServer that adds a “Start Ngrok” button within WordPress itself.  This plugin includes the Relative URL rewrite for links and most plugins.  When a user clicks the “Start Ngrok” button, it tells the plugin the domain and it automatically creates the ngrok tunnel for them.

This plugin is now included with DesktopServer Premium (as it requires some bits that are included with Desktop Server Premium).