Sitemagic CMS powers thousands of the most beautiful websites on the internet.
That's because creative professionals choose Sitemagic CMS as their platform.
But don't let the beauty fool you.
Underneath Sitemagic CMS runs a highly capable framework that allow developers to extend and customize everything.
Despite all that power, Sitemagic CMS is a super userfriendly Content Management System.
Anyone who knows how to use a browser, can create stunning websites with Sitemagic CMS.
- PHP 5.2 or higher with the following PHP extensions enabled: GD, mbstring and SimpleXML;
- Apache or Nginx web server installed on you system
- MySQL or MariaDB – optional.
So, let's start with the installation. Make sure that all OS packages are up to date by running the following commands:
Stop and remove Apache if it is installed and running on your server:
systemctl stop httpd
systemctl disable httpd
yum remove httpd
Install required packages:
yum install nginx mariadb mariadb-server php php-fpm php-cli php-curl php-gd php-mbstring php-mysql php-xml
Edit the /etc/php-fpm.d/www.conf configuration file and change:
user = apache
group = apache
To:
user = nginx
group = nginx
Run the following command:
chown nginx: -R /var/lib/php/session
Start the PHP-FPM, Nginx and MariaDB services and enable them to start on boot:
systemctl start php-fpm
systemctl start nginx
systemctl start mariadb
systemctl enable php-fpm
systemctl enable nginx
systemctl enable mariadb
Download the latest stable version of Sitemagic at http://sitemagic.org/Download.html to the '/opt' directory on the server. Then, extract it and move the Sitemagic files and directories to the '/var/www/html/sitemagic' directory. At the time of writing this tutorial, the latest stable version of Sitemagic is 4.1.2.
cd /opt/
unzip -d /var/www/html/ SitemagicCMS412.zip
mv /var/www/html/Sitemagic/ /var/www/html/sitemagic/
Create a new Nginx configuration file for your website:
vi /etc/nginx/conf.d/yourdomain.com.conf
Add the following content:
server {
server_name www.yourdomain.com yourdomain.com;
listen 80;
root /var/www/html/sitemagic;
access_log /var/log/nginx/yourdomain.com-access.log;
error_log /var/log/nginx/yourdomain.com-error.log;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Replace all of 'yourdomain.com' with your own domain name. Also, the web server user (nginx) needs to be able to write to 'data', 'files' and 'templates' directories and config.xml.php file. It can easily be accomplished by executing the following command:
chown -R nginx:nginx /var/www/html/sitemagic/
Test the Nginx configuration:
It the test is successful, restart the Nginx service:
Sitemagic CMS stores data as XML files in the '/var/www/html/sitemagic/data' directory on the server by default, so there is no need to create and use a database.
Open http://yourdomain.com with your favorite web browser and log in using 'admin' as username and 'admin' as password. Then, go to the administrator menu and click 'Settings', change the administrator username and password and click 'Save'.