Blank pages after modx update. Basic MODX Settings

Installing MODX

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 this moment modx-2.5.5-pl). Then unzip the contents of the folder by clicking the Extract to this directory button.

We select the folder where we want to transfer the files, for convenience, click the checkbox so that after the transfer we are automatically transferred to the root, where we copy the 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 website. In the ISPmanager panel, look for Databases and go there. At the top there will be a Create button, after clicking it a window will pop up with fields where you need to specify the following:

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

Instead of [domain], you need to enter our domain without punctuation marks, for example site.com will look like 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 MODX itself. To do this, go to the link site.com/setup/ and see the installation window:

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

Finally, we enter our data created earlier, that is, data from entering the database MySQL data. The default host is localhost.

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

When we first enter the Site Control Panel, we see an error that alerts us that access to the core of the site is not secure.

To prevent attackers from hacking us, we need to protect the core of the MODX system, which is located in the /core/ folder by default. Let's go to it and rename the file located there from ht.access to .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 the necessary components. Here's a short list of what I use on almost any website:

From Service Provider modx.com

  • TinyMCE- visual editor
  • From Service Provider modstore.pro
  • Tickets - (during installation, install pdoTools and Jevix immediately)
  • phpThumbOn - makes cached previews
  • yTranslit- makes beautiful aliases for links
  • Ace- syntax highlighting
  • mSearch2 - great search for an online store
  • Office - Personal Area, authorization
  • Sendex- newsletter subscription
  • ResVideoGallery - video gallery
  • HybridAuth
  • AjaxForm - Feedback on AJAX
  • HybridAuth authorization via social media
  • Upgrade - engine update in a couple of clicks
  • UserProfile2 - creates an unloading of users, as well as individual pages profiles and the like
  • Content Types

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

    System Settings MODX Revolution

    Point to the gear and click on the System Settings drop-down menu. We need to make initial system settings.

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

    Now in the namespace we select core and the value keys are entered into the search one by one and changed to the required parameters. Here's an example of the settings:

    site_name - NEXT PC (enter the site name)
    publish_default - Yes (publish by default)
    friendly_alias_realtime - Yes (create an 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
    All that's left to do is create a Document with an empty template called SEO, uncheck Publish and check Do not show in the menu. Next, create a child document from this document and call it robots.txt, go to the Settings tab.

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

    Save. After which, if ACE is installed, then we will have the Content field 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 is site .com is our current URL.

    After which you need to create another child document from the SEO document and call it sitemap.xml. Set the content type to XML and uncheck the Use HTML editor checkbox, then select 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. You will need to insert the snippet there:

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

    Then let's go to templates and create a template in the Sites category - site.com, 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. Let's save. Afterwards, go to the created document Page not found and in the Content field, where we display the TinyMCE visual editor, click on the HTML button and in the pop-up window that opens, insert the following:

    There is nothing at the address "//".

    Reasons that could lead to the error:

    To main

    Then we save.

    Go to System Settings, look for error_page there and insert the ID of the document Page not found into the value field, all IDs in the list of Resources are indicated in parentheses Home (1), etc.

    Further more. Let's create system settings. To do this, go to the System Settings section, select the namespace core and the 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 template for any site is ready.

    People think that 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, certain efforts must also be made on the part of the site creator to ensure that the security of the site remains at the proper level.

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

    1 Move core 2 Change panel address

    Typically, the administrative panel of a site on MODX is located at https://site.ru/manager. Moving the admin panel helps to cover up the traces of MODX a little, and doing this is as easy as shelling pears - just rename the directory itself (for example, from manager to admin or abrakadabra), and then specify the new path in one configuration file:

    • core/config/config.inc.php
    3 Update add-ons

    Even if you are completely satisfied with the functionality of current versions of add-ons, this does not mean that there are no reasons for updates. As you know, new software versions 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 ensure the security of MODX, so it is recommended to periodically update MODX to the latest stable release.

    5 Divide and conquer

    If several people are working on the site, then it is highly recommended to configure the minimum required access rights for each user. After all, there is no point in the content manager having access to system settings or snippets with chunks.

    Even if the content manager doesn’t have the itch to tinker with the system, an attacker may appear who, taking advantage of the user’s incompetence, can intercept access to the admin area. This is especially true if you work with the site through an unsecured 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.

    The first lesson on creating a blog on MODX Revolution. In this lesson we will look at the process of installing the MODX Revolution content management system on local server Denwer.

    Dear site visitors, welcome to the series of lessons on learning CMS MODX Revolution, in which we will look at the step-by-step creation of a blog, starting from installing this CMS and ending fine tuning various components.

    The main requirement when creating a website on MODX Revolution is knowledge and understanding of the basics of HTML and CSS technologies; without them, it is better not to study this CMS. In addition, within this course, you also need to have knowledge of the Twitter Bootstrap 3 platform, because... the entire blog interface will be created using classes and components of this platform.

    Let's look at the process of installing the MODX Revolution system in stages.

    Preparatory stage: Installing CMS MODX:
    Login to the site control panel:

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

    After successfully entering your 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.e. If necessary, it can be removed by deleting the "manager" folder from the site directory.

    Do you plan to create a large informational portal, an organization's website, a simple Internet business card, after completing the MODX installation process, you will in any case need to make basic setup systems.

    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 basic system settings, without mentioning which the whole point of self-learning is lost...

    The first thing you need to do is get rid of the system configuration error "Kernel directory in open access" if such a message appears. We correct it according to the instructions in the message, that is, we rename the ht.access file located in the core folder, giving it the 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 moved the core folder beyond the root directory by installing MODX using an advanced package, the third method will not help you.

    After refreshing the window, make sure that the message is gone.

    Further settings are made in the “System settings and events” window. To open the settings window, move the mouse cursor to the gear icon in the right top corner admin panel and select the first item “System settings”.

    There are a huge number of system settings in Revo

    To make it easier to find the 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. Depending on the type of setting, they are entered either manually or selected from a list.

    Basic system parameters that are usually edited immediately after installing MODX

    Section "Site"

    • Site name: the name of the project we need, free form
    • Site unavailable message: text that will be displayed in disabled (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, Yes / No options

    Section "System and Server"

    • Displaying the RSS feed “MODX News”: disable (No)
    • Displaying the RSS feed “MODX Security Notifications”: disable (No)

    Section "Control Panel"

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

    “Friendly URLs” section – CNC mode

    • Transliteration of aliases: russian (to enable transliteration, you additionally need to install the translit add-on)
    • Container suffix: Clear
    • Use friendly URLs: Yes
    • Strict friendly URL mode: Yes
    • Check for duplicate URIs in all contexts: Yes

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

    There is no need to confirm changes or save settings, everything happens automatically.

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

    If you plan to create a large portal or website for an organization, a simple Internet business card, or a landing page, after installing MODX you will need to initial setup systems.

    There are quite a lot of settings in this control system, it is possible that initially you can even get confused and confused. Let's look at the basic system settings that are necessary for the proper operation of your website or portal.

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

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

    If you moved the core folder beyond the root directory by installing MODX using an advanced package, the third method will not help you.

    Further settings are made in the “System settings and events” window. To open the settings window, move the mouse cursor to the gear icon in the upper right corner of the admin panel and select the first item “System Settings”.

    There are a huge number of system settings in Revo

    To make it easier to find the 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. Depending on the type of setting, they are entered either manually or selected from a list.


    Basic system parameters that are usually edited immediately after installing MODX

    Section "Site"

    • Site name: the name of the project we need, free form
    • Site unavailable message: text that will be displayed in disabled (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, Yes / No options

    Section "System and Server"

    • Displaying the RSS feed “MODX News”: disable (No)
    • Displaying the RSS feed “MODX Security Notifications”: disable (No)

    Section "Control Panel"

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

    “Friendly URLs” section – CNC mode

    • Transliteration of aliases: russian (to enable transliteration, you additionally need to install the translit add-on)
    • Container suffix: Clear
    • Use friendly URLs: Yes
    • Strict friendly URL mode: Yes
    • Check for duplicate URIs in all contexts: Yes

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

    There is no need to confirm changes or save settings, everything happens automatically.

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