Do you plan to create a major informational portal, a site-organization, the simplest online business card, after the MODX installation process is completed, in any case, you will need to perform a basic system setup.

There are a huge number of settings in this control system, fewer than the stars in the sky, but enough to initially get a little confused. Let's not go to extremes. Let's consider only the main system settings, without mentioning which the whole point of self-learning is lost ...

The first thing to do is to get rid of the system configuration error " Kernel directory in open access ” if such a message appears. We fix it according to the message instructions, that is, we rename the file ht.access located in the folder core giving it a name. htaccess.

This can be done either through an FTP client, or through file manager hosting control panel, or using the file manager of the administrative part of MODX (tab " Files” on the left side of the window).

If you have moved the core folder behind the root directory by installing MODX using an enhanced package, the third method will not work for you.

Refresh the window to make sure the message is gone.

Further settings are made in the "System Settings and Events" window. To open the settings window, move the mouse cursor over the gear icon in the right upper corner admin panel and select the first item "System Settings".

There are a huge number of system settings in Revo

To make searching easier desired setting you can use the filter by selecting the necessary parameters by section.

The “+” icon on the left side of the setting name will open a hint about what this item is intended for. And in the "Value" field, the parameters of each setting themselves change. They, depending on the type of setting, are entered either manually or selected from the list.

Basic system parameters that are usually edited immediately after installing MODX

Section "Site"

  • Name of the site: the name of the project we need, free form
  • Site unavailable message: text that will be displayed in offline (unpublished) site mode, free form
  • Publish by default: whether the new document will be available for viewing by visitors immediately after creation and saving, your choice, options Yes/Not

Section "System and Server"

  • Displaying the RSS feed "MODX News": disable ( Not)
  • Displaying the MODX Security Notices RSS Feed: disable ( Not)

Section "Control Panel"

  • Show tooltip text next to field: description of menu items, useful only when getting acquainted with the system, can be disabled later, options Yes/Not
  • Date format in control panel: can be changed to ours, native, d-m-Y
  • First day of the week: set 1 , we are not Strugatsky

Friendly URLs Section - CNC Mode

  • Alias ​​transliteration: Russian(to enable transliteration, you additionally need to install an add-on translit)
  • Container suffix: Cleansing
  • Use friendly URLs: Yes
  • Strict Friendly URL Mode: Yes
  • Check for duplicate URIs in all contexts: Yes

Having enabled CNC (URL friendly mode) on the site, rename additionally ht.access in the root of the site to .htaccess, otherwise you will get a 404 error when you try to navigate to pages other than the main one.

Confirmation of changes or saving of parameters is not required, everything happens automatically.

You can additionally visit the section " Content types" (menu item " Content”) and clear the field “ File extension' in the HTML parameter. Now the page address will become without extension, that is http://site_address/about instead of http://site_address/about.html.

The first tutorial on creating a blog on MODX Revolution. In this tutorial, we will walk through the process of installing the MODX Revolution content management system on local server Denver.

Dear visitors of the site, welcome to the cycle of lessons on learning CMS MODX Revolution, where we will look at phased creation blog, starting from the installation of this CMS and ending fine tuning various components.

The main requirement when creating a site on MODX Revolution is to know and understand the basics HTML technologies and CSS, without them this CMS is better don't study. In addition, within the framework of this course, it is also necessary to have knowledge of the Twitter Bootstrap 3 platform, because. the entire interface of the blog will be created using the classes and components of this platform.

Consider the process of installing the MODX Revolution system in the form of stages.

Preparatory stage:

Installing CMS MODX:


Login to the site control panel:

In order to enter the site control panel, you need to address bar browser, enter the following URL: "http://www.mysite.ru/manager/"

After successfully entering the username and password, you will be redirected to the site control panel page.

One of the features of the MODX Revolution system is that this panel is not required for the operation of the site itself, i. if necessary, it can be removed by deleting the "manager" folder from the site directory.

People think security is a noun, something that can be bought. In fact, security is an abstract concept, like happiness.
James Gosling

The developers of MODX Revolution are constantly working to improve the security of the system they create. However, on the part of the site creator, some efforts must also be made to ensure that the security of the site remains at the proper level.

While no one can guarantee absolute protection, we can make it harder for attackers to make your life harder. And in this article I will talk about simple, but effective ways protect your site.

1 Moving core

2 Change panel address

Usually the site administration panel on MODX is located at https://site.ru/manager. Moving the admin panel helps to cover up the traces of the MODX stay a little, and it’s easier than ever to do this - just rename the directory itself (for example, from manager to admin or abracadabra), and then specify new way in one config file:

  • core/config/config.inc.php

3 Update add-ons

Even if the functionality current versions completely satisfied with the additions, this does not mean that there are no reasons for updates. As you know, new versions of software bring with them not only new features, but also various bug fixes (although new bugs are also usually included).

4 Update MODX

As I wrote above, the MODX developers are constantly working to keep MODX secure, so it's a good idea to periodically update MODX to the latest stable release.

5 Divide and Conquer

If several people work on the site, it is highly recommended to set the minimum necessary access rights for each user. After all, it makes no sense for a content manager to have access to system settings or snippets with chunks.

Even if the content manager does not itch his pens to tinker with the system, an attacker may appear who, taking advantage of the user's incompetence, will be able to intercept access to the admin area. This is especially true if the work with the site is carried out through an insecure connection, as a result of which the login and password are transmitted over the network in clear text. To reduce the risk of password interception, it is recommended to purchase and install an SSL certificate, then all requests will be transmitted in encrypted form.

MODX Installation

Go to the File Manager of your ISPmanager panel, select a directory in the /www/ folder and upload the archive with MODX Revolution there ( latest version on the this moment modx-2.5.5-pl). After unpacking the contents of the folder by clicking the Extract to this directory button.

We select the folder where you want to transfer the files, for convenience, click the checkmark so that we are automatically transferred to the root after the transfer, where we copy files and folders.

Then we delete everything unnecessary, initially this is the index.html file, the modx-2.5.5-pl folder, the modx-2.5.5-pl.zip archive and change the name of the ht.access file to .htaccess.

Now we need to create a database for our future site. In the ISPmanager panel, look for Databases and go there. At the top there will be a Create button, after clicking which a window with fields will pop up, where you need to specify the following:

Name:[domain]_new
Database server: MySQL
Encoding: utf8
User:--Create new user--
Username:[domain]_new
Password:(generated by clicking on the cubes)

Instead of [domain], you need to enter our domain without punctuation marks, for example, site.com will look like ours sitecom_new

We save the name and password in a notepad so that we can use this data when installing MODX. Save by clicking on OK.

Now let's move on to installing the MODX itself. To do this, go to the link site.com/setup/ and see the installation window:

On the third item, you need to check the Disable CSS / JS compression.

Finally, we drive in our data created earlier, that is, the data from the entrance to the database MySQL data. The default host is localhost.

We drive in the login and password from the admin panel, be sure to indicate the working e-mail, so that in case of an error you can restore access to the control panel.

When you first enter the Site Control Panel, we see an error that notifies us that access to the site core is not safe.

In order to prevent attackers from hacking us, we need to protect the core of the MODX system, which by default is located in the /core/ folder. Let's go into it and rename the file located there from ht.access in .htaccess.

Setting up MODX Revolution

First you need to create a new Service Provider from modstore.pro in the Applications -> Installer section, so that in the future we can download the components necessary for our site from there.

Then you need to download necessary components. Here is a short list of what I use in almost any site:

From Modx.com Service Provider

  1. TinyMCE - visual editor
From Modstore.pro Service Provider
  1. Tickets - (when installing, immediately installs pdoTools and Jevix)
  2. phpThumbOn - makes cached previews
  3. yTranslit - makes beautiful link aliases
  4. Ace - syntax highlighting
  5. mSearch2 - great search for an online store
  6. office - Personal Area, authorization
  7. sendex - newsletter subscription
  8. ResVideoGallery - video gallery
  9. HybridAuth -
  10. Ajax Form - Feedback on AJAX
  11. HybridAuth - authorization through social networks
  12. Upgrade - engine update in a couple of clicks
  13. UserProfile2 - creates a user upload, as well as individual profile pages and the like
Content types

Select in the main menu Content -> Content Types and in the HTML values ​​change .html to slash /

MODX Revolution System Settings

Hover over the gear and click System Preferences in the drop-down menu. We need to do the first initial settings systems.

Here, first we will configure yTranslit, you need to select the ytranslit namespace from the filter, in the list that opens, open the Key with a plus sign Yandex API and click on the link to get the API, then copy the key to this field.

Now in the namespace select core and key values ​​in turn in the search drive and change to the desired parameters. Here is an example of settings:

site_name- NEXT PC (enter site name)
publish_default- Yes (publish by default)
friendly_alias_realtime- Yes (create alias in real time)
friendly_alias_restrict_chars-alphanumeric
friendly_alias_translit- Russian
friendly_urls- Yes
use_alias_path- Yes

SEO files

We need to create the following files:

  • Page not found
  • robots.txt
  • sitemap.xml
The only thing left to do is create a Document with an empty template called SEO, in which we uncheck Publish and check Do not show in the menu. Next, create a child document from this document and name it robots.txt, go to the Settings tab.

Set the content type to text and uncheck the Use HTML editor checkbox, then check the Freeze URI checkbox and enter robots.txt in the field that appears.

We save. After that, if ACE is set, then the Content field will be with syntax highlighting and we need to add the following there:

User-agent: * Disallow: / Disallow: /manager/ Disallow: /connectors/ Disallow: /core/ Disallow: /assets/components/ Host: site.com Sitemap: http://site.com/sitemap.xml Where site .com is our current URL.

After that, you need to create another child document from the SEO document and name it sitemap.xml. Set the content type to XML and uncheck the Use HTML editor checkbox, then check the Freeze URI checkbox and enter sitemap.xml in the field that appears.

After refreshing the page, the Content field should have syntax highlighting and line counting. There you will need to insert the snippet:

[[!pdoSitemap]] Now let's create a Category called Sites and from it we will create a name from our domain, for example site.com

After that, let's go to the templates and create a template in the Sites - site.com category, which we will call Page not found. Next, in the Sections of the SEO document, create a new child document and name it Page Not Found. Save. After we go into the created document Page not found and in the Content field, where we have the TinyMCE visual editor, click on the HTML button and paste the following in the pop-up window that opens:

By the address " " there is nothing.

Reasons that could lead to the error:

To main

Then we save.

Go to System Preferences and look for error_page and in the value field we insert the document ID Page not found, all IDs in the Resources list are in brackets Home (1), etc.

Further more. Let's create system settings. To do this, go to the System Settings section, select the namespace core and filter Website. Then click on the Create button new parameter and in the window that opens, enter the following values:

Key
sites_img Meaning
/assets/sites/[[++site_url]]/images/ Save. In the same way, we create 3 more parameters:

Key
sites_css Meaning
/assets/sites/[[++site_url]]/css/ Key
sites_js Meaning
/assets/sites/[[++site_url]]/js/ Key
sites_fonts Meaning
/assets/sites/[[++site_url]]/fonts/ Our preparation for any site is ready.

The most common problem is when White screen on modx appears after moving or changing the server on the hosting. Don't worry, it's very easy to fix. The following is a simple guide for you.

In 99% of cases, clearing the cache folder (core / cache) helps. You can delete it, and if you are afraid, then just move its contents somewhere. So, go to the hosting (ftp, file manager) to the folder with your site and delete / move content site.ru/core/cache.


How to clear cache folder on modx

After that, re-open the modx admin panel. Everything should appear.

There is another way. Login to your admin panel and select from the menu at the top Manage-Clear Cache.


But it didn’t work for me - a window popped up, and the OK button did not become active. So I just deleted the contents of the folder through the hosting.

If that doesn't help, just clearing the cache

Also, many advise to change something in the database when modx white screen not disappearing. These are the points:
MODX News (feed_modx_news_enabled)
MODX security notifications (feed_modx_security_enabled)
Use compressed CSS (compress_css)
Use compressed javascript libraries (compress_js)

There are two ways to do this. The first is to go to the modx admin panel, Settings (site.ru/manager/?a=system/settings). Find them there and put the value "no".

But my settings did not open, so I used the second method: I went to the hosting, opened phpmyadmin (database management), found the modx database, a table with settings modx_system_settings. Then I changed the value for those 4 points above from 1 to 0. That is, for feed_modx_news_enabled, feed_modx_security_enabled, compress_css, compress_js put 0.



Just in case, delete the cache again in the core/cache folder.

No menu on modx

I also had a problem when modx admin is loading, but there is no menu on the left. The fix is ​​very simple - we do everything described above, usually it is enough to clear the cache (via Manage-clear cache or clean the core / cache folder).

Why is there a white screen on modx

As I wrote at the beginning, a white screen in the modx admin panel appears when moving to another hosting. But I had another problem - host changed my server, and notified about a day later. That is, my site has changed its IP address. First I needed change A-record in the domain settings (what to redirect the domain to new server), and then solve the problem with the admin panel. So, in addition to moving to another hosting, another change of the server at one hosting also affects.

Use it, like it. And then I rarely began to write something, although there is something about ...