How to install Craft CMS using Composer & XAMPP Windows 11
Craft CMS is yet another free and user-friendly content management system that you can use to create a website. You can try this CMS for free when you download its Solo Version. Other versions are Pro which cost $299 and Enterprise. For this tutorial, we are going to make (of course) a free website out of its free or Solo version. But before anything else, please download the XAMPP and Composer files below. We will be needing these applications later.
Requirements:
- XAMPP x64-8.0.23-0-VS16 [download here]
- Composer-Setup [download here]
Assuming that you already downloaded the files above, continue doing the tutorials below.
Table of Contents
- Installing XAMPP
- Running XAMPP Control Panel
- Installing Composer
- Making a Craft CMS database on phpMyAdmin
- Installing Craft CMS website using Composer via Powershell
- Opening Craft CMS website homepage
- Opening Craft site admin account
Here are the steps on how to install Craft CMS using Composer and XAMPP in your Windows pc
Installing XAMPP
1. Again, go to the XAMPP file that you downloaded. Open it. If a Question about "antivirus running" appears, click on Yes to proceed.

2. If a Warning also appears about User Account Control (UAC), just leave it and press OK to proceed.

3. Under Setup - XAMPP, just press NEXT.

4. In the Select Components, just leave it as it is and press NEXT again.

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

6. Under Language, select English. Press NEXT to proceed.

7. We are now ready to install XAMPP, click on NEXT to start.

8. Wait for the installation to finish.

9. When done, click on Finish to exit the installer.

Running XAMPP Control Panel
1. To run XAMPP, you can click its shortcut located in your desktop or go to Start and search for "xampp" and press ENTER.

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

3. You will see two Stop buttons now, meaning, Apache and MySQL are both running.

4. If a "Windows Security Alert" appears, just click on Allow access to exit the alert.

Installing Composer
1. Open the Composer executable file that you downloaded earlier. In the "Select Setup Install Mode" click on "Install for all users (recommended)" to proceed.

2. Under Installation Options, just press NEXT.

3. In the Settings Check do the following. For the "Choose the command-line PHP you want to use" just press on Browse and go to This PC > c drive > xampp > php > and click on php.exe to select it. When done, check the "Add this PHP to your path?" option. Press NEXT to continue.

4. In the Proxy Settings, just leave it and press NEXT.

5. We are now ready to install Composer. Click on Install to start.

6. Wait for the installation to finish.

7. Under Information, just leave it and press NEXT.

8. Click on Finish to exit the installer. Your Composer is now installed on your pc.

Creating a Craft CMS database on phpMyAdmin
1. We are now going to create a Craft CMS database. Open your web browser and type 127.0.0.1 and then press ENTER.

2. Inside, click on phpMyAdmin to proceed.

3. Now inside phpMyAdmin, click Databases.

4. In the Create database, name your database as "craft_db" for this tutorial. Character set, choose utf8mb4_unicode_ci. Press Create to confirm.

5. In Create new table, name your table as craft_table. By default column is set to 4. Just leave it and press Create to proceed.

6. For structure, name it as craft and next to it Type should be set to INT.

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

8. Save your database.

Installing Craft CMS website using Composer via Powershell
1. We are now ready to install our Craft CMS website. Open your Windows Powershell.

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

3. You will then see the image below, after pressing ENTER. Composer is now creating the "craftcms/craft" project at the selected location. If Questions are asked, just type "y" and press ENTER to proceed.

4. When done, you will see a "Craft CMS - a new install" graphics and "Welcome to Craft CMS!" messages.

5. Now, we need to change directory. Type cd "c:\xampp\htdocs\craft" and press ENTER to change your current directory to your craft folder directory.

6. As you can on the image below, from "C:\Users\zemira" my current directory is now at "C:\xampp\htdocs\craft".

7. Now, type php craft setup and press ENTER.

8. Do the following for the next step.
- Which database driver are you using? (mysql or pgsql) [mysql] - just press ENTER
- Database server name or IP address: [127.0.0.1] - just press ENTER
- Database port: [3306] - press ENTER
- Database username: [root] - press ENTER
- Database password: - leave it blank and press ENTER
- Database name: type craft_db and press ENTER
- Database table prefix: leave it blank and press ENTER
- Install Craft now? (yes|no) [yes]: press ENTER
- Username: [admin] - press ENTER
- Email: type a valid email address and press ENTER
- Password: type your admin password (do not forget it) and press ENTER
- Confirm: re-type your password and press ENTER
- Site name: name your website and press ENTER
- Site URL: type http://localhost/craft and press ENTER
- Site language: [en-US] - just press ENTER.

9. After installation, you will a message saying "***installed Craft successfully (time: 5.543s)".

Opening Craft CMS website homepage
1. To open your Craft website homepage, open your web browser and go to 127.0.0.1/craft/web or localhost/craft/web.

Opening Craft site admin account
1. To open your website admin page, just go to 127.0.0.1/craft/web/admin/login.

2. Enter your username which is admin and your password. Press Sign in to proceed.

3. Inside your administration page, you will see there your Dashboard, Utilities, Settings, and Plugin Store. This is only accessible and available to you as admin and owner of your Craft website.

Thank you for reading this tutorial. I do hope that you have learned a lot while doing this. If you have a question, just 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!