How to Install WriteFreely on Windows 11

WriteFreely is a free, open-source, and lightweight platform for publishing text-based content for individuals and communities. In this tutorial, we will show you how to install WriteFreely on Windows 11.

Prerequisites

Before we proceed with installing WriteFreely, make sure you have the following requirements:

Step 1 - Download WriteFreely

First, you need to download the WriteFreely zip file from writefreely.org.

Step 2 - Extract the Files

Once the download completes, extract the contents of the zip file to a directory on your web server. For example, C:\xampp\htdocs\writefreely.

Step 3 - Configure Your Database

Create a new database for WriteFreely on your MySQL or MariaDB server. You can use command-line tools or graphical interfaces like phpMyAdmin or MySQL Workbench to create a database.

Make sure you grant appropriate privileges and permissions to the database and user that you’ll use to connect to the WriteFreely database.

Step 4 - Configure Your Server

To run WriteFreely on your web server, create a virtual host and configure its settings as follows:

<VirtualHost *:80>
    ServerName writefreely.local
    DocumentRoot "C:/xampp/htdocs/writefreely/public"
    <Directory "C:/xampp/htdocs/writefreely/public">
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    
   SetEnv WRITEFREELY_ENV "production"
   SetEnv WRITEFREELY_HTTPS "off"
   SetEnv WRITEFREELY_HOST "writefreely.local"
   SetEnv WRITEFREELY_HTTP_PORT "80"
   SetEnv WRITEFREELY_DB_NAME "writefreely"
   SetEnv WRITEFREELY_DB_USER "writefreely"
   SetEnv WRITEFREELY_DB_PASS "password"
</VirtualHost>

Replace writefreely.local with your hostname, and set the appropriate database name, username, password, and other configuration settings according to your preferences.

Step 5 - Install Dependencies

WriteFreely uses Composer to manage its dependencies. Navigate to the directory where you extracted the WriteFreely zip file, and run the following command:

composer install

This will install all the required dependencies and libraries for WriteFreely.

Step 6 - Configure WriteFreely

Copy the config.ini.sample file to config.ini in the writefreely directory. Edit the config.ini file and set the required values according to your server configuration:

[server]
host = "localhost:8080"
read_timeout = 300
write_timeout = 600
cookie_secret = "YourRandomSecretKeyHere"

[database]
driver = "mysql"
server = "127.0.0.1"
port = 3306
name = "writefreely"
username = "writefreely"
password = "password"

Make sure that the database settings match the values you set in Step 3.

Step 7 - Set up the Admin User

WriteFreely requires an admin user account to manage the website. To set up the admin user, navigate to the WriteFreely directory and run the following command:

./writefreely --config "/path/to/your/config.ini" --newuser

Follow the instructions to create the admin user account.

Step 8 - Run WriteFreely

To start WriteFreely, navigate to the directory where you extracted the WriteFreely zip file, and run the following command:

./writefreely --config "/path/to/your/config.ini" --http ":8080"

Replace /path/to/your/config.ini with the full path to your config.ini file.

Navigate to http://writefreely.local:8080 to access your WriteFreely site.

Congratulations, you have successfully installed WriteFreely on your Windows 11 machine.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!