Jump to content

Developer environment for ProcessWire 3.x on Litespeed with MariaDB?


tinacious
 Share

Recommended Posts

Hello! I have a client who's been very happy with their ProcessWire site over the years and I'm doing some updates and core upgrades.

I upgraded it from 2.4 to 2.7 then to 3.0 (specifically ProcessWire 3.0.229). Everything seems to be running fine so far. My local dev environment is a standard LAMP stack with MAMP on macOS. The client is moving to different infrastructure and requires support for LiteSpeed and MariaDB instead of Apache and MySQL. My understanding is that these are compatible "drop-in replacements" for Apache and MySQL though I personally have used neither.

I was wondering if there were any recommended tools that would allow me to test this environment locally for a sanity check to ensure everything will be ok once I pass the project off to the internal IT team. I'd love to be able to see this running locally with this setup. In the past I've used Vagrant and a version of ScotchBox (archived project) that I modified to support ProcessWire. This was a long time ago so I'm open to something else.

Has anyone had any issues with moving a ProcessWire 3.0 install to LiteSpeed and MariaDB from Apache/MySQL?

Thanks for your help!

Link to comment
Share on other sites

Hi,

I don't think you'll see differences between MySQL and MariaDB, and LightSpeed supports .htaccess so this is a good news.

To test it, it depends on your habits, I'm not a MacOS user, why not installing a Debian distribution in a virtual machine? MariaDB is the default database, and LightSpeed has a sh script to install it. On Windows I would use Linux WSL.
There's also OpenLightSpeed in official Debian packages, but I don't know the differences: https://www.howtoforge.com/how-to-install-lomp-stack-openlitespeed-mariadb-and-php-on-debian-11/

Edited by da²
  • Like 3
Link to comment
Share on other sites

MariaDB won't be an issue.  I'm running ProcessWire on it with quite a few sites, from simple to complex, without any issues. (fun fact, Craft CMS requires MySQL or PostgreSQL; MariaDB won't work)

I don't have direct experience with setting up Litespeed but that shouldn't be an issue either.  I think Geffen Playhouse (a site I developed) is on Litespeed.  The hosting company has abstracted that away and Litespeed is built as a drop-in replacement (?) for Apache so I wouldn't worry about that either.

As @da² mentioned, if you use Windows, WSL is an excellent and seamless choice to spin up a VM to test, or DigitalOcean or Hetzner if you don't want to install a VM hypervisor on your system.  Either way, you'll have to set up the server software and configure it yourself.  I recommend Ubuntu 24.04 and installing everything with apt.   If using VS Code, you can connect to the server and modify files as if it were a local VM site using VS Code Remote SSH.

  • Like 2
Link to comment
Share on other sites

Thanks @da² and @Jonathan Lahijani for your answers. Yeah, I agree that it seems from what I've read it should just work, I just like to test to be sure and was hoping to do it locally, but maybe it's unnecessary. 

I have VirtualBox on my Mac but haven't worked with it directly, just via Vagrant and Genymotion (Android emulators). I could see about getting Debian or Ubuntu running in that. Or alternatively, I could just use DigitalOcean since I'm very familiar with them and have used them for several ProcessWire sites in the past (I even wrote this old article for them ~10 years ago: https://www.digitalocean.com/community/tutorials/how-to-install-processwire-on-an-ubuntu-vps) – I suppose setting up LiteSpeed and MariaDB won't be much different, I was just hoping there was a quicker way than provisioning a Linux box myself, e.g. a Docker compose file that maybe works out of the box.

Thanks everyone, I appreciate the quick responses!

  • Like 1
Link to comment
Share on other sites

If you're willing to use a Docker-based solution for your local dev testing -- or just give it a go, I just searched via Google to see if there was a Docker container pre-configured that someone's put together using your two listed prerequisites. There is (of course) a WordPress setup that someone has shared. You could use Docker and setup the customized container, then either delete WordPress (if you want) or use the setup and just install ProcessWire alongside it for testing (and then [likely] destroy it when you're done testing).

A lot of PW developers here love DDEV as a development environment which uses Docker as the underlying service. It might be an opportunity for you to try an alternative local development hosting setup just to see if you like it. Honestly, I don't know if you'll want to switch from MAMP fulltime as MAMP is likely going to be more responsive with system resources. BUT, for a quick test of validating LiteSpeed and MariaDB support (if you didn't want to spin up a DigitalOcean or Linode or similar service temporarily), it would definitely work in a pinch to give you some more peace of mind.

Docker Hub: LiteSpeed WordPress Setup

Link to comment
Share on other sites

Thanks @BrendonKoz, I did already see the LiteSpeed WordPress setup you linked, which appeared to be for the enterprise version. Assuming a paid license would've been required, I tried OpenLiteSpeed one instead. I'm not sure if you looked at the template at all but there's a lot going on there. I did give it a try, it generated lots of conf files in a new lsws directory, and I ran into some errors trying to modify the Docker compose file—it would be far too time-consuming to do it this way, and if I'm going to go to that level, I may as well configure a VPS since changing a Docker configuration is doing that plus containerizing it.

DDEV sounds appealing but upon closer inspection, this supports MariaDB but does not have documentation for LiteSpeed so unless it's an undocumented feature, this isn't a suitable suggestion. Did you see support for LiteSpeed somewhere? Feel free to link it, because I did not. My question was specifically about dev environments for spinning up LiteSpeed with MariaDB to ensure compatibility with the client's infrastructure.

image.thumb.png.535b1664a2ded8b021d91d21825acd20.png

image.thumb.png.d72de12a0b2ba83cd69d229fbe9c71e0.png

  • Sad 1
Link to comment
Share on other sites

I would advise you to use Docker or DDEV for that. You could use my composition here as a starting point. It uses MariaDB 10.6 and apache+php8.2 (custom image which auto-installs PW). You can then replace the web container with a Litespeed+php container and configure it. You can refer to the Dockerfile of my custom image to get started with that.

As for Litespeed, from my very limited experience, any serious hoster should be using the enterprise variant because, as far as I know, only that really offers full drop-in replacement for apache. This makes it hard to run locally without a license.

Edited by poljpocket
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Nice @poljpocket! I've starred it and will keep this in mind. Where's the image referenced here: https://github.com/poljpocket/processwire-docker/blob/19e801318605bfabb81e262baa9ddb3d10ef2afd/docker-compose.yml#L5 (I'm guessing wherever that code is is where the Apache stuff is configured?)

Thanks!

Edit: I saw it's in your 2nd link: https://github.com/poljpocket/processwire-docker-image/blob/main/scripts/install.sh I'll take a look 👀

Edited by tinacious
  • Like 1
Link to comment
Share on other sites

Sorry, tinacious - my suggestions were generalized suggestions of things to try that might get you there, not necessarily a full solution on its own without some additional legwork. Glad poljpocket's suggestion gets you a little closer!

Link to comment
Share on other sites

  • 2 weeks later...

Hey @BrendonKozand @poljpocket, I just wanted to update that I have used ddev based on your suggestions and scripts and it's great. Thanks again for sharing that info and those configurations. I had been using MAMP pro (trial) but when the trial expired, the free version didn't work for some reason. I gave ddev a try with MariaDB, and it worked great. Thank you both for that suggestion. I didn't get to test Lightspeed but I think it'll probably be fine. 🤞 Thanks again!

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...