How to install Anchor CMS on a Debian 7 VPS


Anchor CMS is an open-source, lighter-weight and ultra-simple blogging system.It’s written in PHP and comes with markdown support, custom fields, themes, i18n compatibility and many more.

In this blog post we will write about how to install Anchor CMS on a Debian 7 (Wheezy) VPS with MySQL, PHP-FPM and Nginx.

Install MySQL and create a database.

apt-get update
apt-get upgrade
apt-get install mysql-server mysql-client
mysql -uroot -p

Install Nginx and PHP-FPM

apt-get install nginx php5-fpm php-cli php5-mysql php5-gd php5-mcrypt

Download the latest version of Anchor CMS as a zip file from:

wget -P /tmp
unzip /tmp/download -d /tmp

Create a root directory for your web site and move Anchor files into it

mkdir -p /var/www/{public_html,logs}
rsync -aq /tmp/anchor-cms-*/ /var/www/
chown -R www-data: /var/www/

Nginx configuration.

Create a new Nginx server block with the following content

# /etc/nginx/sites-available/
server {
  listen 80;
  root /var/www/;
  access_log /var/www/;
  error_log /var/www/;
  index index.html index.php;
  location / {
    try_files $uri $uri/ @rewrites;
  location @rewrites {
    #rewrite ^ /index.php last;
    rewrite ^/(.*)$ /index.php?url=$1 last;
  location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
    access_log off;
    expires max;
  location ~ /\.ht {
    deny  all;
  location ~ \.php {
    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Symlink it and restart the server

ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/
/etc/init.d/nginx restart

Anchor CMS installation

Open a browser pointing to your Anchor CMS installation, click on the “Run the installer” button and follow the on-screen instructions to complete the process.

Of course, you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install this for you. They are available 24×7 and will take care of your request immediately. For more information, you can also check Install Anchor CMS on a Debian 8 VPS.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment

To prove you are human please solve the following *