Fork CMS is a free open source content management system (CMS) written in PHP and uses Symphony components. The CMS offers a user-friendly interface with powerful apps that make it easy to create, manage and monitor your website.
In this article, you will install Fork CMS on a fresh Ubuntu 20.04 Vultr server instance.
Login to MySQL.
$ mysql -u root
Create a new database.
CREATE DATABASE forkdb;
Create a new user and assign a strong password.
CREATE USER `forkuser`@`localhost` IDENTIFIED BY `STRONG PASSWORD`;
Grant the user full rights to the fork cms database.
GRANT ALL PRIVILEGES ON forkdb.* TO `forkuser`@`localhost`;
Refresh database rights and exit the console.
FLUSH PRIVILEGES; EXIT
Ensure that you download the latest release from the Fork CMS website. In this article, we install version 5.11.0 as the latest version.
$ wget https://www.fork-cms.com/frontend/files/releases/forkcms-5.11.0.tar.gz
Extract the file
$ tar -xvf forkcms-5.11.0.tar.gz
Now, move the extracted file contents to your webroot directory, by default
/var/www/html is used for LAMP.
$ sudo mv forkcms/* /usr/share/nginx/html/
$ sudo apt install php-curl php-cli php-zip unzip
$ curl -sS https://getcomposer.org/installer | php
Install Composer to the
$ sudo mv composer.phar /usr/local/bin/composer
Verify your Composer installation.
$ composer Composer version 2.1.11 2021-11-02 12:10:25 Usage: command [options] [arguments]
Create a new Fork CMS project using Composer.
$ composer create-project forkcms/forkcms
Move the created forkcms project files to your webroot directory.
$ sudo mv forkcms/* /var/www/html/
Edit your Apache virtual host file
$ sudo nano /etc/apache2/sites-available/default
Find the lines:
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory>
Change them to:
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
Find the lines below and change
Require all to granted.
<Files ".ht*"> Require all denied </Files>
Save and close the file.
$ sudo a2enmod rewrite
$ sudo service apache2 restart
Visit your server IP address or linked domain name through a web browser. A welcome page will be displayed if all Fork CMS files were installed well.
Click Next and select modules you wish to install along on your CMS.
Under Settings, enter your database information created on Step 1.
Next, enter your valid Email address and password you will use to login to Fork CMS and
Once Fork CMS is installed, login to your Admin Dashboard by adding
/private to your server URL.
Delete the fork cms installation script to protect your server.
$ rm -r /var/www/html/var/cache/install
Use composer to install Fork CMS dependencies.
$ composer install -o
Create a new .env in your webroot directory and add the following lines
Congratulations, you have successfully installed Fork CMS on your Ubuntu 20.04 server. You can now get started with building your website on the PHP-based platform.