We assume you already purchased a SingleCMS Full license and downloaded the scms.php
(If you still need a license you can get it on our main page).
If you want to use using SingleCMS from a subdirectory (e.g. /singlecms/ instead of /) please open the scms.php and change following line at the beginning of the file:
define('SCMS_BASE', "/");
Replace /
with your sub directory path. E.g. if you have SingleCMS installed into the sub directory /singlemcs
than change the path to /singlecms/
:
define('SCMS_BASE', "/singlecms/");
Save the file and continue with
Copy scms.php
Copy the scms.php in the main folder of your project
As SingleCMS is PHP-based you need to be able to execute PHP code in your project sites.
1) Open your file manager and navigate into your project folder
2) Rename the file your want to make SingleCMS-ready (in the example we use index.html
) to a .php
(index.html
to index.php
) and save it
It could be that you link to your .html file somewhere in your project. You need to re-target this link to the newly created .php file!
To activate SingleCMS for the certain file open index.php
with your favorite editor and add the following code snippet to the end of your <head>
<?php include "scms.php";?>
Your <head>
should look something like following
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>My new page with SingleCMS</title>...<?php include "scms.php";?></head>
We use the basic SingleCMS block in this quickstart. For advanced block options, visit the section Advanced block options.
The basic block looks like following
<?php $scms->text("BLOCKNAME",[]);?>
You can simply put it where ever you want your customers to be able to edit the content.
Make sure every block has its own name, as if not data loss could occur
Let's try this:
<div><h1>My heading</h1><div class="thecontent">LoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLoremLorem</div></div>
Becomes:
<div><h1>My heading</h1><div class="thecontent"><?php $scms->text("BLOCKNAME",[]);?></div></div>
That was easy. Now your customers can edit this section in the backend.
Reminder: You can access the login by simply appending a ?login
to every site you included the base block
e.g. https://google.com?login
As we have a white-list user system, per default only the admin account is allowed to edit this block. More about the user management
Now upload the newly created index.php
and the scms.php
onto your server
Access the backend (with appending ?login
to the url) and login as admin
(Password: admin
)
For security reasons your are prompted to change the admin password. Please do that.
Also you have to enter the license key you received in the email from us.
The Quickstart is done and you can edit the entered block in the backend.
For further configuration visit the other articles in this documentation.