MODX Revo - System Installation. How to fix white screen on Modx after moving MODX Revolution System Preferences

The most common problem is when white screen on modx appears after moving or changing the server on the hosting. Do not be afraid, everything is fixed very easily. Next, I offer you a simple instruction.

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


How to clear the cache folder on modx

After that, reopen the modx admin panel. Everything should appear.

There is another way. Go to the admin panel and select in the menu at the top Management-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 via hosting.

If just clearing the cache does not help

Also, many people advise to change something in the database when modx white screen does not disappear... 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 one is to go to the modh admin panel, Settings (site.ru/manager/?a\u003dsystem/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 in the core / cache folder again.

No menu on modx

I also had a problem when modx admin is loaded, but there is no menu on the left... It is very easy to fix - we do everything described above, usually it is enough to clear the cache (via Management, clear the cache or clear the core / cache folder).

Why does a white screen appear on modx

As I wrote in the beginning, a white screen in the modx admin panel appears when you move to another hosting. But I had another problem - the hoster 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 (to redirect the domain to the new server), and then solve the problem with the admin panel. So, in addition to moving to another hosting, server change on one hosting also affects.

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

People think security is a noun, something to buy. 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. Nevertheless, on the part of the site creator, certain 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, it is in our power to make it harder for attackers to make your life more difficult. And in this article, I will talk about simple but effective ways to protect your site.

1 Moving the core

2 Changing the panel address

Typically, the administrative panel of the site on MODX is located at https://site.ru/manager. Moving the admin panel helps a little to cover up the traces of MODX, and it's easy to do this - 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 the functionality of the current versions of the add-ons is completely satisfactory, this does not mean that there is no reason 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 usually included).

4 Update MODX

As I wrote above, the MODX developers are constantly working to keep MODX secure, so it is recommended that you periodically update MODX to the latest stable release.

5 Divide and Conquer

If several people are working on the site, it is highly recommended to configure 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 doesn’t have to scratch his hands in order to dig deeper into the work of the system, an attacker may appear who, taking advantage of the user's incompetence, will be able to intercept access to the admin panel. This is especially true if the work with the site is carried out 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.

Installing MODX

Go to the File Manager of your ISPmanager panel, select the directory in the / www / folder and upload the archive with MODX Revolution there (the latest version is currently 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 you want to transfer the files, for convenience we will 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 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 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 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 site.com/setup/ link and see the installation window:

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

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

We drive in the login and password from 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 notifies us that access to the site's core is not secure.

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

MODX Revolution setup

First you need to create a new Service Provider from modstore.pro in the Applications -\u003e 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 site:

From Service Provider modx.com

  1. TinyMCE - visual editor
From Service Provider modstore.pro
  1. Tickets - (during installation, immediately installs pdoTools and Jevix)
  2. phpThumbOn - makes cached previews
  3. yTranslit - makes nice aliases for links
  4. Ace - syntax highlighting
  5. mSearch2 - great search for an online store
  6. Office - personal account, authorization
  7. Sendex - newsletter subscription
  8. ResVideoGallery - video gallery
  9. HybridAuth -
  10. AjaxForm - aJAX feedback
  11. HybridAuth - authorization via social networks
  12. Upgrade - engine update in a couple of clicks
  13. UserProfile2 - creates user unloading, as well as individual profile pages and the like
Content types

Select Content -\u003e Content Types in the main menu and change .html to slash /

MODX Revolution system settings

Hover over the gear and click on the System Preferences drop-down menu. We need to make the initial system settings.

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

Now in the namespace we select core and the keys of the values \u200b\u200bare in turn driven into the search and changed to the required parameters. I will give an example of settings:

site_name - NEXT PC (enter 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
There is little left to do, we create a Document with an empty template with the name SEO, from which we uncheck the Publish and tick the Do not show in the menu. Next, we 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, and then select the Freeze URI checkbox and enter robots.txt into the field that appears.

We save. After that, if ACE is installed, then the Content field will be with us with syntax highlighting and the following should be added 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.

Then 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, and then select the Freeze URI checkbox and enter sitemap.xml into the field that appears

After refreshing the page, the Content field should be with syntax highlighting and line counting. You will need to insert a snippet there:

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

After that, go to templates and create a template in the Sites - site.com category, which we will call Page not found. Next, in the Sections for the SEO document, create a new child document and name it Page not found. Let's save. After we go to the created document The page was 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:

By the address " " there is nothing.

Reasons that could lead to the error:

to home

Then we save.

We go to System Preferences, there we are looking for error_page and in the value field, insert the document ID Page not found, all IDs in the Resources list 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 filter Website... After that, click on the Create new parameter button and enter the following values \u200b\u200bin the window that opens:

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

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

Do you plan to create a large information portal, an organization site, or a simple Internet business card, after the MODX installation process is complete, you will in any case need to make a basic system setup.

There are a lot of settings in this control system, less than the stars in the sky, but enough to initially get a little confused. Let's not rush to extremes. Let's consider only the basic system settings, without the mention of which the whole meaning of self-learning is lost ...

The first thing to do is get rid of the system configuration error " Open source kernel directory"If such a message appears. We fix it according to the instructions of the message, that is, we rename the file ht.accesslocated in the folder coreby giving it a 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 MODX administrative part (the “ Files"On the left side of the window).

If you moved the core folder outside the root directory by installing MODX using the extended 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 upper right corner of the admin panel and select the first item "System settings".

There are a lot 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 “+” sign 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 are changed. They, depending on the type of setting, are either entered 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 to 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, options Yes/No

Section "System and Server"

  • Displaying the MODX News RSS feed: disable ( No)
  • Display MODX Security Alerts RSS Feed: Disable ( No)

Section "Control Panel"

  • Show tooltip text next to field: description of menu items, useful only when getting to know the system, in the future you can disable, options Yes/No
  • Date format in control panel: can be changed to ours, dear, d-m-Y
  • First day of the week: put 1 , we are not Strugatsky

"Friendly URLs" section - CNC mode

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

After enabling CNC (friendly URL mode) on the site, rename ht.access in the root of the site to .htaccess, otherwise you will receive a 404 error when trying 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 address of the pages will become without extension, that is http: // site_address / about instead http: //Site_address/about.html.

Today we are going to make the basic settings for the MODX Revo.

MODX setup

Go to the MODX admin panel (http: // your_domain_name / manager /) and go to the settings panel “ System settings».

Here you can filter settings related to a particular component of the MODX system, as well as settings related to the same component, but grouped into categories depending on the function performed.

We configure the following parameters for the core (core).

Allow users to use one email address - allow_multiple_emails - no

Caching skipping

Visual editor

Editor - which_editor - TinyMCE RTE (it should install itself if you installed it)

Element Editor - which_element_editor - Ace (it should also be installed if you installed it)

File system

Maximum upload size - upload_maxsize - 629145600 or whatever you need (I set this parameter to 600 MB to be able to upload video files).

Friendly URLs

Gatewayskip.

Vocabulary and language

Text editor language in the front-end of the site - fe_editor_lang - ru

Locale - ru_RU.utf8

mail skip.

Control Panel

First day of the week - manager_week_start - 1

Monday in Russia.

Place TV below content - tvs_below_content - Yes

Additional custom fields for pages will be located below the main content input field. If the option is not clear now, you will figure it out later. The option is just for the convenience of the admin interface. This is more convenient for me.

Field for the name of a node in the resource tree - resource_tree_node_name - menutitle

It is done so that the names of the resources in the tree on the left are shorter.

Tooltip field for a node in the resource tree. - resource_tree_node_tooltip - alias

This is done so that you can understand what the resource has an address

Show welcome screen - welcome_screen - no

phpThumb, Proxies, Sessions and Cookiesskip.

Website

Do not show in menu by default - hidemenu_default - Yes

Newly created resources (pages) will be unchecked "Show in menu" by default. It can be turned on at any time. But why uncheck the box once again, because not all pages of the site created in the future will be displayed in the menu. By setting the option to "Yes", you will not need to perform unnecessary actions in the future.

URL Scheme - link_tag_scheme - -1 (minus 1)

Publish by default - publish_default - Yes

The same story as with the previous option, just the opposite. When the page is created, there will already be a “Publish” checkbox. If the resource is not published, then it will not be available to site visitors. But we create public pages - right?

Site name - site_name - enter the name of the site, available for further insertion by the placeholder [[++ site_name]]. Any name, for example, Construction company "Horns and Hooves" LLC.

Site unavailable message - site_unavailable_message - The site is under maintenance. Please check back a little later.

You can write whatever you want. The inscription will be displayed to everyone who visits the site during its maintenance. A separate option is used to transfer the site for maintenance.

AT 404 error page "Document not found" - error_page, Page "Site is not available" site_unavailable_page and 403 "Access Denied" error page unauthorized_page there are units (i.e. everything is redirected to the main page, I recommend and assign them in the settings)


System and Server

Displaying the MODX News RSS feed - feed_modx_news_enabled - No

Display the MODX Security Alerts RSS feed - feed_modx_security_enabled - No

Server type - server_protocol - https (if you have an ssl certificate installed, if not, then go ahead)

Additional settings, for those who are from my lesson.

We go to the section mixedimage and in File transliteration (mixedimage.translit) set Yes.

So that the images uploaded to the resources are transliterated.

Then we go to the section tickets and in Count pageviews as guests (tickets.count_guests) set Yes.

We go to the section admintools and in Enable authorization via email (admintools_email_authorization) we put Yes (if you are working on a server - we increase security), as I usually put Theme (admintools_theme) - dark.

This completes the initial settings. We will return to the rest of the MODX settings as needed.