How to Install Shlink on Windows 11

Introduction

Shlink is a URL shortener tool that is designed for easy and reliable link management. In this tutorial, we will show you how to install Shlink on Windows 11.

Prerequisites

Before we start the installation process, make sure your system meets the following requirements:

  • Windows 11 installed
  • PHP 7.4 or later version installed
  • MySQL or MariaDB database installed
  • Latest version of Composer installed

Installation

Follow the below steps to install Shlink on Windows 11:

  1. Download the latest version of Shlink from the official website.

  2. Extract the downloaded archive file to a directory of your choice.

  3. Open the command prompt as an administrator.

  4. Navigate to the directory where you extracted the Shlink zip file.

  5. Run the following composer command:

    composer install
    

    This command will install all the necessary dependencies required to run Shlink.

  6. Next, set up the database configuration by creating a .env file in the root directory of Shlink.

    The .env file should contain the following configuration details:

    APP_ENV=prod
    APP_SECRET=shlinkappsecret
    DATABASE_URL=mysql://root:password@localhost/shlink
    

    Update the database username (root), password (password), and database name (shlink) according to your database details.

  7. Once you have created the .env file, run the following command to create the necessary database tables:

    vendor/bin/doctrine-migrations migrate
    
  8. Finally, start the Shlink server by running the following command:

    php -S localhost:8000 -t public
    

    This will start the Shlink server on http://localhost:8000.

Conclusion

You have successfully installed Shlink on your Windows 11 system. You can now use the powerful URL management tool to shorten and manage your URLs effectively. Remember to configure the necessary settings as per your requirements before you start using Shlink.