Building the Optimal WordPress Development Environment and Hosting Stack

Building the Optimal WordPress Development Environment and Hosting Stack

šŸ“š Table of contents:

Hosting stack components

Iā€™m going to talk about the hosting stack a lot here. Itā€™s a combination of technologies and services that serves as the ā€œengineā€ for your development environment. There are four typical parts of a full stack:

  • The operating system (OS). This will be either Linux, Windows, or macOS. Most servers run on Linux, and hardly any on macOS [1].
  • Your web server tech. Apache and Nginx lead the way here. Nginx is a modern and performant option. There are lots of others with good market share too, such as Cloudflare Server and even Node.js [2][3].
  • A database. In most cases, this will be either MySQL or MariaDB. Youā€™ll also see PostgreSQL, depending on your server-side language.
  • The core server-side programming language. In a nutshell, this is what makes your site work. For WordPress and most of the web, itā€™s PHP [4].

Iā€™m going to focus on typical Linux, Apache/Nginx, MySQL/MariaDB, and PHP ā€“ ā€œLAMPā€ or ā€œLEMPā€ ā€“ stacks for this post, as weā€™re all likely using WordPress. Aside from WordPress, though, there are even more options. For instance, Iā€™m currently putting together several apps that run on Docker, Caddy, Redis, and Python (along with Flask and Django):

Hosting is crucial, as it has a direct impact on almost everything to do with your website. Letā€™s look at this next.

Choosing suitable hosting

In my opinion, WordPress development environments benefit from the consistency of the tech constraints. Of the four components of a web server, only the choice of web server has an impact. Linux, PHP, and MySQL/MariaDB are a given for WordPress ā€“ and Nginx is almost a reflex install as well.

This can be confusing, because if every hosting option gives you essentially the same stack, why not simply choose the cheapest? Well, other factors, such as setup flexibility, control, and the scalability and performance of the host architecture are key.

The benefits of cloud hosting for WordPress development

Shared hosting can work in lots of scenarios, but not for development. Instead, cloud hosting providers such as DigitalOcean, Vultr, and Linode are better fits based on flexibility in their server-side settings. Most providers give you control over scaling your resources, too.

The DigitalOcean dashboard.

The cloud is closer to ā€œbare-metalā€ than a typical host. Using a cloud hosting with control panels, such as RunCloud or SpinupWP, gives you tighter integration with WordPress.

The SpinupWP dashboard.

For example, I use DigitalOcean servers coupled with SpinupWP for my own websites. The interface is excellent, and the functionality is near perfect. In contrast, I also use DigitalOcean for Python projects, where setting up a server can be a relative hassle.

The limitations of general-purpose hosting services

Hosting such as Bluehost or SiteGround is convenient and easy to use, but some limitations wonā€™t fly in a typical development environment.

Iā€™ve used lots of hosts in the past ā€“ GoDaddy was my first, then SiteGround for a long time, and DreamHost here and there. Each can help highlight limitations for development in a number of ways:

  • I actually enjoyed using GoDaddy the most out of the three examples here. šŸ¤· At the time, it was a flexible solution. This was before I discovered version control, deployment pipelines, and an actual workflow. When I looked to come back later on, I wasnā€™t able to find the setup to suit me.
  • Git support and staging will be essential. With SiteGround, these are only available on the highest premium plans. It might not be a concern for you, but I also didnā€™t like SiteGroundā€™s move to a custom control panel, as it made me feel ā€œlockedā€ into the provision.
  • DreamHost offers lots of functionality for developers, but itā€™s spread out over some expensive tiers. DreamObjects and DreamCompute are great, but thereā€™s an extra layer there for me that doesnā€™t suit my development processes.

This blend of abstraction, price, and resource management could decide your choice of hosting. For general-purpose hosting, you have to choose two of the ā€œdark triadā€ ā€“ fast, cheap, and good ā€“ and pick two at the expense of the other.

Hosting stack requirements

A hosting stack for a WordPress development environment needs the following:

  • A smart enough price to be able to make it a long-term choice.
  • As little abstraction in accessing server functionality as possible, within the boundaries of your personal resources such as time and knowledge.
  • Isolation from other sites, site owners, and setups.
  • Access to WordPress development tools such as WP-CLI, Git, and staging environments.

The ultimate in meeting these requirements is cloud hosting in my opinion, especially alongside a server control panel such as SpinupWP. Even so, you might not get that choice.

Itā€™s going to be more common for a site to use ā€œoff-the-shelfā€ hosting from DreamHost, Kinsta, SiteGround, and many others. With a good setup, this wonā€™t be a problem.

Advanced configurations for optimal server performance

There are maybe some exceptions, but a typical host server will need customization and extra dependencies for development. This is where a dive into each hostā€™s documentation and knowledge base will help. DreamHost even offers a dedicated list of supported technologies.

The Supported Tech page in DreamHost's website.The fact that you canā€™t run Minecraft on DreamHostā€™s shared hosting plan is a big ā€œNoā€ from me. šŸ˜ 

This is one reason why it pays to research the right hosting. For instance, SiteGround is often mentioned as being good for development projects. However, it doesnā€™t support Node.js and offers only Linux Fedora as an OS. If your production server uses a different Linux distro, this could impact your testing. In contrast, DreamHost supports popular tech such as Docker and NoSQL databases.

In short, when I log into a new hosting account, hereā€™s what I customize:

  • MariaDB has slightly better performance than MySQL, so I pick that. For my Python work, I also use PostgreSQL.
  • I use Git for deployment, so set this up straight away as I need to push and pull through the command line ā€“ especially to staging.
  • Iā€™ll also investigate my page and object caching options. With some hosts, you wonā€™t need a plugin for this.
  • For WordPress, I set up Nginx on the server. For other projects, Iā€™ve been working with Caddy (which is cool!). As an example, SiteGroundā€™s shared hosting uses Apache.
  • I look to establish a direct connection to the server with SSH/SFTP and an app such as Cyberduck. Iā€™ll also set minification options if available, my PHP version, and controlling traffic and crawlers ā€“ something DreamHost offers out of the box.

Your own requirements will mean your list differs from mine. Regardless, the big positive with general-purpose hosting is that you often get interface toggle switches to set most of these options.

Final recommendations

A capable host for development is essential. My current WordPress business website runs on a cloud server, which is my recommendation, but it doesnā€™t have to be the only choice. With the right functionality, typical hosting can serve you well. Version control, staging, scalability options, and access to ā€œbare-metalā€ server options will all make a difference.

Iā€™d love to hear your thoughts about your decision-making when it comes to choosing a WordPress development host. Tell me about it in the comments below!

Keep reading the article at WPShout. The article was originally written by Tom Rankin on 2024-05-16 02:41:42.

The article was hand-picked and curated for you by the Editorial Team of WP Archives.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

Your email address will not be published. Required fields are marked *

āœ•
Show Your ā¤ļø Love! Like Us
Scroll to Top