Setting up FusionCMS on Laragon
In this post we'll take a look at setting up FusionCMS on Windows using Laragon.
When developing Laravel applications we tend to lean on Homestead (or Valet), which are both great and we recommend them for developing locally on FusionCMS. They suited our needs just fine. However, we realize some of our users will want to use their own environments, so in this article we'll explore setting up a fresh FusionCMS install on a Homestead alternative.
Being an avid MAMP user in the past I understand the appeal of using a GUI. It allows you to configure settings all through an interface, as well as, restarting Apache for the update to set in. Laragon is one such GUI tool to easily setup a development environment all in one application. What makes it really cool is it's ability to switch between different software versions and have it immediately notice them. It'll also provides automatically setup, friendly URLs out of the box (e.g. app.test) named after your site folders.
We'll be using the Laragon - Full version, which can be found on this page for download.
After installing Laragon, you may notice it's running on PHP 7.2, which is a bit dated for our needs as FusionCMS tries to stay on the cutting edge of most Laravel-related packages. Therefore, we'll be updating to PHP 7.4, and updating Apache while we're at it.
At the time of writing this, Laragon ships with Apache 2.4 (or
http-2.4.35-win64-VC15). You can grab the latest version of Apache here. Navigate down to the Latest Version section and grab the source files.
For example, I'll be downloading:
After downloading, extract the bundle file into your
\laragon\bin\apache folder. If you're having trouble finding this folder you can easily access it through the GUI. Simply click the Root button and navigate to the desired location.
Image courtesy of Laragon.
Finally, make sure you're using the new version from the GUI (via the Menu & System Tray).
At the time of writing this, Laragon ships with PHP 7.2 (or
php-7.2.19-Win32-VC15-x64). FusionCMS uses the latest version of Laravel, which requires at least PHP 7.3. Therefore, we'll go a step further to PHP 7.4. You can grab the latest stable version of here.
Again you'll be downloading the source bundle extract to
\laragon\bin\php (similar to updating Apache).
Finally, make sure you're using PHP 7.4 from the GUI (via the Menu & System Tray).
Image courtesy of Laragon.
Laravel requires a couple extensions to be enabled. Make sure the following lines are uncommented in your
extension=curl extension=fileinfo extension=gd2 extension=intl extension=mbstring extension=mysqli extension=openssl extension=pdo_mysql extension=xsl
Our MySQL version is fine, but we'll want to change the root password (as the FusionCMS Installer doesn't allow for empty strings). Navigate to Menu > MySQL > Change root password.
We'll set ours to
Throughout all the previous steps, if you run into any issues try Stop/Start All to reboot everything.
Since we're on a roll, let's update to Composer v2 as it's less-memory intensive than v1.
$ composer self-update
Click the Terminal button from the Laragon GUI to position ourselves within our site folder. Next we'll run the following command to make sure we're in the root folder.
$ cd ~C:\laragon\www
And use composer to setup a fresh laravel project:
$ composer create-project laravel/laravel fusioncms
Now we can install
$ cd fusioncms $ composer require fusioncms/cms:dev-nightly
Depending on how many packages composer already has cached, this could take a considerable amount of time. If you run into any memory issues you can play around with the Menu > PHP > Quick Settings. Try increasing the
memory_limit to at least 1G and then try again.
Finally, install FusionCMS:
$ php artisan fusion:install
The FusionCMS Installation Wizard will ask a couple questions, most of which have acceptable default values we can just accept. After the installation is complete, we'll have a fresh copy of FusionCMS to play around with.