How to Install WonderCMS on Debian 9

Using a Different System?

  • How to Install WonderCMS on Ubuntu 18.04 LTS

  • How to Install WonderCMS on FreeBSD 12

  • How to Install WonderCMS on Fedora 29

  • How to Install WonderCMS on CentOS 7

Are we missing a guide for your target system? Request one, or submit your own!

WonderCMS is an open source, fast and small flat file CMS written in PHP. WonderCMS source code is hosted on Github. This guide will show you how to install WonderCMS on a fresh Debian 9 Vultr instance with Nginx as a web server.


  • PHP version 7.1 or greater with the curl, mbstring and zip extensions.
  • Web server such as Apache with the mod_rewrite module enabled, Nginx or IIS. This guide will use Nginx.

Before you begin

Check the Debian version.

lsb_release -ds# Debian GNU/Linux 9.7 (stretch)

Ensure that your system is up to date.

apt update && apt upgrade -y

Install some basic system administration packages if they are not installed.

apt install -y vim sudo curl wget git unzip bash-completion apt-transport-https lsb-release ca-certificates dirmngr

Create a new non-root user account with sudo access and switch to it.

adduser johndoe --gecos "John Doe"usermod -aG sudo johndoesu - johndoe

NOTE: Replace johndoe with your username.

Set up the timezone.

sudo dpkg-reconfigure tzdata

Install PHP

Add ppa:ondrej/php to your system’s software sources.

sudo apt-get install apt-transport-https lsb-release ca-certificatessudo wget -O /etc/apt/trusted.gpg.d/php.gpg "deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

Install PHP, as well as the necessary PHP extensions.

sudo apt install -y php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-curl php7.2-zip php7.2-mbstring

Check the version.

php --version

Install Nginx

Install Nginx.

sudo apt install -y nginx

Check the version.

sudo nginx -v

Run sudo vim /etc/nginx/sites-available/wondercms.conf and configure Nginx for WonderCMS.

server {  listen 80;  server_name;  root /var/www/wondercms;  index index.php;  location / {    if (!-e $request_filename) {      rewrite ^/(.+)$ /index.php?page=$1 last;    }  }  location ~ database.js {    return 403;  }  location ~ /.php(/|$) {    include snippets/fastcgi-php.conf;    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;  }}

Save the file and exit.

Activate the new wondercms.conf configuration by linking the file to the sites-enabled directory.

sudo ln -s /etc/nginx/sites-available/wondercms.conf /etc/nginx/sites-enabled/

Test the configuration.

sudo nginx -t

Reload Nginx.

sudo systemctl reload nginx.service

Install WonderCMS

Create a document root directory.

sudo mkdir -p /var/www/wondercms

Change ownership of the /var/www/wondercms directory to johndoe.

sudo chown -R johndoe:johndoe /var/www/wondercms

Navigate to the document root folder.

cd /var/www/wondercms

Download and unzip WonderCMS.

wget WonderCMS-2.6.0.ziprm

Move WonderCMS files to the document root directory.

mv wondercms/* . && mv  wondercms/.* .rmdir wondercms

Change ownership of the /var/www/wondercms directory to www-data.

sudo chown -R www-data:www-data /var/www/wondercms

Open your site in a web browser and log in with the default password admin and change the default password afterward.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.