How to Install YOURLS on Windows 11

YOURLS is a free and open-source URL shortener that allows you to create your own custom URL shortening service. Here's a step-by-step tutorial for installing YOURLS on your Windows 11 machine.

Prerequisites

  • PHP (version 5.3+) with the following extensions: cURL, MySQLi, iconv
  • MySQL or MariaDB database
  • Web server like Apache or Nginx

Step 1: Download YOURLS

Step 2: Create a YOURLS database

  • Create a new database for YOURLS in MySQL or MariaDB.
  • Create a new user and grant it full privileges on the YOURLS database.

Step 3: Configure YOURLS

  • Rename the file users/config-sample.php to users/config.php.
  • Open users/config.php in a text editor and update the following fields:
define( 'YOURLS_SITE', 'http://example.com' );
define( 'YOURLS_DB_USER', 'yourlsuser' );
define( 'YOURLS_DB_PASS', 'yourlspassword' );
define( 'YOURLS_DB_NAME', 'yourlsdb' );
define( 'YOURLS_DB_HOST', 'localhost' );
  • Replace the values in the above fields with your own settings.

Step 4: Access YOURLS

  • Start your web server and open your web browser.
  • Go to http://localhost/YOURLS/admin to access the YOURLS administration interface.
  • Log in using the default username "admin" and password "password".
  • Change the password to a more secure one, and start creating your custom URL shortening service!

Congratulations! You have successfully installed YOURLS on your Windows 11 machine.