How to install Silverstripe CMS in XAMPP Windows 11


Silverstripe CMS is another content management system for creating liver or development websites for free. It was developed by Silverstripe. Its current stable release during the creation of this tutorial is version 4.7.3 which was released on March 5, 2021. For this post, we are going to create a simple website out of it. Download the necessary files below to be able to start.


Requirements:


Assuming that you downloaded the files above, continue to the tutorials below.


Table of Contents

  • XAMPP Installation
  • Composer Installation
  • Opening XAMPP and running Apache and MySQL
  • Creating Database needed for Silverstripe installation via Localhost
  • Downloading Silverstripe using Composer via Powershell
  • Installing Silverstripe website using localhost via web browser
  • Opening Silverstripe website homepage
  • Accessing Silverstripe website admin page
  • Creating Silverstripe New Admin User Account

Here are the steps on how to install Silverstripe website using XAMPP in Windows pc


XAMPP Installation


1. Open the XAMPP file that you downloaded. If a Question appears regarding antivirus running press Yes to continue.


xampp installation question about running antivirus

2. In the Warning regarding User Account Control (UAC) press OK to proceed.


xampp installation warning about user account control

3. Under Setup - XAMPP press NEXT to continue.


xampp installation xampp setup

4. In the Select Components, just press NEXT to proceed.


xampp installation select components

5. Under Installation folder, do not change it. Just press NEXT to proceed.


xampp installation folder location

6. In the Bitnami for XAMPP press NEXT to proceed.


xampp installation bitnami for xampp

7. We are now ready to install XAMPP. Press NEXT to proceed.


xampp installation ready to start

8. Wait for the installation to finish.


xampp installation underway

9. When done, press Finish to exit the installer.


xampp installation done

Composer Installation


1. We are now going to install Composer. We will be using it to download Silverstripe CMS later. Open the Composer executable file that you downloaded. In the Select Setup Install Mode, select "Install for all users (recommended)".


select install mode for composer

2. In the Installation Options just press NEXT to proceed.


intallation options for composer

3. In the Settings Check, browse for the php.exe which is located in This PC > C drive > xampp > php folder. Also check the "Add this PHP to your path" option. When done, press NEXT to proceed.


composer installation settings check for php

4. Leave Proxy Settings as it is and press NEXT to proceed.


composer proxy settings

5. We are now Ready to install Composer, press Install to start the installation.


composer is ready to be installed

6. Wait for "Running the Composer installer script..." to finish.


downloading and running composer installer script

7. Under Information, just press NEXT to proceed.


composer setup information

8. You have successfully installed Composer, press Finish to exit the installer.


successfully installed composer

Opening XAMPP and running Apache and MySQL


1. We need to run XAMPP now. To start, go to This PC > C drive > xampp and press open xampp-control.exe.


accessing xampp control.exe directory to open xampp cpanel

2. Under XAMPP Control Panel, click the Start buttons for Apache and MySQL.


starting xampp apache and mysql services

3. Apache and MySQL both have the Stop buttons now, meaning, they are now running.


successfully ran xampp apache and mysql services

4. If a Windows Security Alert appears, just press Allow access to proceed.


allow access to xampp in windows defender firewall

Creating Database needed for Silverstripe installation via Localhost


1. We are now going to create the database needed for our Silverstripe installation. Make sure you already ran XAMPP. To Start, open your web browser and go to 127.0.0.1 and press ENTER.


accessing xampp localhost using internet browser

2. Inside, click phpMyAdmin.


accessing phpmyadmin using xampp localhost

3. Inside phpMyAdmin, click Databases.


accessing phpmyadmin via xampp localhost to make silverstripe database

4. In the Create database, name your database as silverstripe_db and next to it set charset to utf8mb4_unicode_ci. Press Create to proceed.


silverstripe database name

5. In the Create table, name your table as silverstripe_table and set number of columns to 4. Press Go to proceed.


silverstripe create table table name

6. Next, set structure or field name to silverstripe. Select INT for Type.


silverstripe structure name

7. Under Collation, select utf8_unicode_ci and leave all the other fields blank.


silverstripe collation utf8_unicode_ci

8. Save your work.


save structure collation for silverstripe

Downloading Silverstripe using Composer via Powershell


1. We are now going to download Silverstripe CMS installer using Composer via Powershell. Open your Powershell.


opening windows powershell

2. Inside Powershell, type composer create-project silverstripe/install "C:\xampp\htdocs\silverstripe" and press ENTER.


typing the command to download silverstripe installer inside xampp htdocs using powershell via composer

3. Wait for the downloading and installing as well as locking files to be finished.


downloading installing silverstripe via composer using powershell

4. Under 3 "Do you trust" questions regarding composer/installers, silverstripe/recipe-plugin, and silverstripe/vendor-plugin, just press letter "y" and press ENTER to allow all installations and code execution.


allowing composer installer recipi plugin and vendor plugin to be enabled and installed via powershell

5. Again, wait for the installation to finish.


installing the allowed installer and plugins for composer via powershell

6. When done, you will see the same image as below.


successfully downloaded silverstripe using composer via powershell

Installing Silverstripe website using localhost via web browser


1. We are now ready to install Silverstripe. Again, open your web browser and go to 127.0.0.1/silverstripe and press ENTER.


accessing silverstripe installation folder via xampp localhost using web browser

2. If you a an error saying "Silverstripe Framework requires a 'database' key in DB::getConfig(). Did you forget to set SS_DATABASE_NAME or SS_DATABASE_CHOOSE_NAME in your environment?", then, we need to fix this first before we can continue with the installation.


silverstripe framework requires a database key in db getconfig error during installation

3. To fix the error, go to This PC > C drive > xampp > htdocs > silverstripe folder > then, find .env.example file. Right-click the file and open or edit with Notepad.


editing silverstripe env example file inside to fix db config error

4. Inside .env.example file, do the following: SS_DATABAE_CLASS="MySQLDatabase" , SS_DATABASE_SERVER="localhost" , SS_DATABASE_USERNAME="root" , SS_DATABASE_PASSWORD="" (no password) , SS_DATABASE_NAME="silverstripe_db". I personally added the # SITE ADMIN section and below it type the following: SS_DEFAULT_ADMIN_USERNAME = "admin" and SS_DEFAULT_ADMIN_PASSWORD = "yourdadminpassword" (do not forget your password). When done, click File > Save.


adding needed database credentials and site admin details to fix db config error during silverstripe installation

5. After saving env.example file, rename it as .env file to make it functional for our Silverstripe installation. When done, go back to your installation page and Refresh or Reload it.


renaming env example file to env for silverstripe installation

6. After reloading your installation page, your Silverstripe website is now installed instantly. 


sample silverstripe website homepage

Opening Silverstripe website homepage


1. To open Silverstripe website homepage, just go to 127.0.0.1/silverstripe or localhost/silverstripe. I already edited the website below that is why you will see that the Site Name is already 123HOW.XYZ and the tag line is also changed.


sample silverstripe website with edited homepage site title and tag line

Accessing Silverstripe website admin page


1. To access Silverstripe admin. Just click "the CMS" link (see image below), or go to 127.0.0.1/silverstripe/admin or 127.0.0.1/silverstripe/Security/login and press ENTER.


access silverstripe admin login page

2. Inside your Silverstripe website admin login page, type your Email which is admin (for now) and your password that you set earlier inside the .env file. Press Login to proceed.


silverstripe website login admin username and password

3. Below is the example of Silverstripe website administration page. Continue to the last tutorial below.


sample silverstripe administration page

Creating Silverstripe New Admin User Account


1. We are now going to create our official Administrator account. Inside your admin account, click Security > Add Member. Under New Member, do the following: First Name - Administrator. Surname - User. Email - enter a valid email address (you will also use this for future logins). Password/Confirm password - your desired admin password (do not forget it). Groups - make sure to set it as "Administrators". When done, click Create to finish creating your new admin account. Done!


silverstripe website create new admin account

Making a website out of Silverstripe is a little bit tricky for me. But, as long as we are able to create a website in the end, it doesn't matter. Thank you for reading this tutorial guys. If you have a question, you can leave a comment below. Cheers!

No comments:

123how.xyz only wants on-topic comment. Do not include any link, else your comment won't be published. Thanks!

Most Read Tutorials:

Powered by Blogger.