I have been on a quest to find the best development environment for me to develop static websites, WordPress websites and PHP applications. Although I plan to use this set-up for developing on, it would appear to me to be perfectly suited for production websites as well depending on your requirements.
Everyone’s preferences and needs are different, my personal criteria is quite picky…
- Manage multiple projects at one time
- Must allow total flexibility with PHP versions, extensions, etc.
- Always up-to-date PHP and security patched operating system
- Cloud based and in sync with different machines and developers
- Ability to share live links with clients and partners as sites are being developed
- Test in a similar environment to production (Nginx preferably, SSL support)
- Access to command line tools (including Node for NPM, Grunt/Gulp, Sass, Git, etc.)
- If on a server, hands-off server admin, I don’t have time for fixing and set-up!
- I remain in full control of all of my data
- Cost effective
I tried MAMP + Git for developing locally on a Mac but getting these links public and sharing between computers was a hassle. I tried Cloud IDE’s such as Cloud9 and CodeAnywhere but I am not a fan of the browser IDE’s and they did not seem to live up to expectation for me at all. Developing on a similar shared hosting environment to how clients are hosted was not possible due to limitations in what can be run on the command line. I was well aware of the advantages of a VPS but paying for management for a dev server was not a very attractive proposition and I was put off of unmanaged VPS because I did not want the hassle of administering one myself.
Good news folks, I think I cracked it!
What is SeverPilot? ✈️
ServerPilot calls itself “The best way to run WordPress and PHP sites”, primarily advertised as for DigitalOcean servers but as I only recently discovered will actually work find on any Ubuntu 16.04 LTS or Ubuntu 18.04 LTS web server that meets some very basic requirements.
ServerPilot is a cloud based control panel that starts off by connecting to a totally fresh VPS installing a great environment for PHP and WordPress development including PHP, MySQL, Nginx, and Apache. It will also configure a firewall and automatically update your servers packages with security updates. Another great feature is AutoSSL that makes the provisioning of Let’sEncrypt certificates a one-click process.
The web based control panel interfaces with your server through a lightweight API to manage users, apps, FTP accounts, SQL databases, and one-click WordPress installs. Because the control panel is hosted by ServerPilot and not on your server it takes up very little resources compared to an on-board control panel such as cPanel or Plesk.
The basic version of ServerPilot costs $5 per server + $0.50 per application.
Why Krystal VPS? 💎
Krystal is a UK based web hosting provider for whom I am a massive advocate. I’ve been building websites for over 10 years and tried a huge number of web hosting companies (and even worked for one once!). It felt like every time I settled with a good hosting partner they would sell out to one of the big hosting conglomerates and go downhill.
Krystal are the largest independent UK web host and promise me they’re not selling. Despite purporting to be the largest independent hosts, their support is quick and feels personal and honest and as a nice bonus they are powered by 100% renewable energy. I have been hosting all of my clients using Krystal services for about 18 months now because I truly believe they are the best provider for shared hosting in the UK today.
This is why when looking for a VPS provider, Krystal were the obvious choice despite DigitalOcean (who ServerPilot primarily advertise as being compatible with) and others working out slightly cheaper.
One of the huge advantages of almost any VPS provider is the ability to very simply scale the server to meet your requirements. It is possible to start off at the very basics and only pay for what you’re using as you grow. I started this development server with the bare minimum VPS that Krystal can provide.
- 1 CPU core
- 1GB RAM
- 20GB SSD disk space
- Unlimited bandwidth
- 1 IP
- No control panel
- No management
- Ubuntu 18.04 LTS
- Backups standard (weekly)
The cost for that is £9.99 + VAT per month and has the ability to add on CPU cores, RAM, disk space, etc. with total flexibility and not limited to predefined packages.
Installing ServerPilot on Krystal VPS (Ubuntu LTS 18.04 x64) 🐧
Provisioning the VPS from Krystal was very simple and comes built within about 10 minutes. Using the fresh VPS you then use the IP and root log in details to provide ServerPilot with access to the server to automatically install their API. The root login is used once and you can change your password in future without disconnecting ServerPilot as it works via API key.
Connecting a server and installing ServerPilot is very simple. You’ll get a form asking for IP address and root password. Clicking connect to ServerPilot will redirect you to a screen that will tell you it’s installing. A short time later you’ll be redirected to the control panel with a success message.
Configuring a default app 👨🏼💻
An ‘app’ on ServerPilot is any website or WordPress website. An app gets its own domain, FTP directory, PHP version, etc. I wanted a default app to host a small landing page and also run some server tools such as a MySQL GUI and monitoring dashboard.
Creating an app is very simple. It is a short form where you name it, choose your domain name, select the server it is going on and which user it should be assigned to. A user is used for FTP and SSH logins, you can have one user for many apps which will greatly reduce the number of logins I need to remember but also give me the ability to limit 3rd-party developers to certain sites only.
Remember to point your domains DNS to your server IP. Since I plan to use this for a development server and use subdomains to host projects, I just set-up a wildcard A record ‘*.dev1.amazoserv.com’ to capture all subdomains matching this pattern and point them to my VPS.
Activating SSL on your new site could not be simpler. Click the SSL button on your app and click activate AutoSSL. Immediately, a Let’sEncrypt certificate will set-up on your website. You are also given the option to set-up redirects from HTTP to HTTPS.
‘One-click’ WordPress installs 🖋
Setting up a WordPress installation on ServerPilot is very simple. Just like creating our default app, except now we’re going to click that ‘WordPress’ checkbox. This will present us with some extra fields to choose a site name, username and password.
Clicking ‘create app’ will immediately set-up a WordPress installation on your server with those details. This WordPress installation will have it’s own FTP directory, database, domain name, etc.
Of course you also get full SSH access as you would expect from your own server as is required more and more for using modern development tools such as Node, NPM, Grunt, Gulp, Sass, etc.
Managing MySQL databases with Adminer 🗄
ServerPilot provides an interface for creating MySQL databases with fully privileged users but does not provide an interface for managing these databases beyond that like you would expect from something like PHPmyAdmin on cPanel.
ServerPilot recommend Adminer, which is a web based MySQL interface powered by a single PHP file. Installation is literally as simple as dropping 1 PHP file on to your server. Now our default app is set-up, it is a case of logging in to SFTP with the user we set-up and dropping this file in.
It’s not the prettiest but all the required functionality is there. I don’t spend much time in here, sometimes I will use the MySQL editor in my IDE and the most common use for accessing the database at all is just to export/import a copy as part of a website migration.
In summary ✅
This set-up appears to meet my criteria!
✅ Manage multiple projects at one time
This scalable service will allow me to host an essentially unlimited amount of projects! The small fee associated with each one will also keep me encouraged to keep it nice and tidy though also.
✅ Must allow total flexibility with PHP versions, extensions, etc.
Allows me to select different PHP versions per application and with full access to the server I can install any PHP extension I like.
✅ Always up-to-date PHP and security patched operating system
ServerPilot is security focused and automatically applies security patches to both software on the server.
✅ Cloud based and in sync with different machines and developers
VPS is always online and can have multiple people connected to it at once
✅ Ability to share live links with clients and partners as sites are being developed
Clients and other developers can access the website on a subdomain at any time
✅ Test in a similar environment to production (Nginx preferably, SSL support)
Hosted on Nginx, PHP 7.2 and with SSL just like my production server
✅ Access to command line tools (including Node for NPM, Grunt/Gulp, Sass, Git, etc.)
Full access to all command line tools I require
✅ If on a server, hands-off server admin, I don’t have time for fixing and set-up!
ServerPilot takes care of installing and updating all required software and easy to set-up new databases and provision apps
✅ I remain in full control of all of my data
In the unlikely event ServerPilot disappeared overnight, the server would continue to function and just would not receive updates. All data will still be there.
✅ Cost effective
£9.99 + VAT per month for basic starter server and $5 + $0.50 per app per month for ServerPilot. Assuming around 15 development sites at once, I would probably want a little extra memory at £3 per GB the total cost would be around (£12.99 + $5 + ($0.50 * 15) = ~£22.50 + VAT per month depending on the exchange rate.
£6 off your first order at Krystal 🤑
Use promo code ‘DB8C8731‘ for £6 off your first order at Krystal making your first month of VPS better than half price! Full disclosure: that’s a referral code and I get a little bonus credit if you use it. I wouldn’t want the bonus credit unless I thought they were the best UK host for me and my clients!
$10 free credit at ServerPilot 💸
Use this link to sign-up to ServerPilot and receive $10 credit. That’s enough for your first couple of months of server fees! Full disclosure: another referral code! I receive a small amount of bonus credit if you use that link.
I hope you found this useful. I’d love to hear about your experiences both about your current WordPress development set-up and if you’ve given ServerPilot a go!