Last Modified: 28.05.2021
Folder for custom development
To make developer's life more convenient, main user project files were moved from the folder
/bitrix into the folder
/local starting starting from the code D7 main module version 14.0.1. Essentially, a single folder
/bitrix is enough to be added into exceptions.
Which folders are processed in
- activities - workflow activities;
- components - components;
- modules - modules;
- php_interface - init.php, folder user_lang;
- templates - site templates, component templates, page templates;
- blocks - Sites24 blocks.
When processing folders, priority is always given to the
/local folder before
/bitrix. It means that if
/bitrix/templates/ contain site templates with the same name, the system connects the template from
Note: It's not recommended to copy entities with the same name into both folders. The more correct solution - is to move entities from one folder to another. When copying, the system will still operate correctly; however there is a significant likelihood to create confusion in developer's work.
Moving a project
How to move an old project into the
You have an old and already running project. Who modified and updated it - is unknown, where adjustments were made - is unknown as well. Your task is to clean it up.
- First, use Project Quality Control that has check for kernel files modification. This test helps to determine, which files were updated.
- Next, create the
/local folder, and do not create the file /local/php_interface/init.php, but only create
/local/php_inteface/events.php, autoloader for your classes and etc., and connect these files in
- Start gradually moving your modified templates into
/local/templates/.default, with the following actions: copy into local with another name, work with test page (if there are no test server available). Next, replace name and delete (or rename) old template from your template folder. This way, new template (cleaned up and ready for use) will gradually be assembled in local. As soon as all templates and components are moved into /local; init.php also can be moved.
- Component handling is different: if these components are your native components, they can be moved as is (nothing will change from it). Modified standard components must be copied first from main core and then modifications compared and updates introduced.
- Direct links in templates and components must be replaced to
/local/**. Also, attentively check modules as well and, if required, move them as well.
It's impossible to state, how much time is required for this process. It all depends on how the project is "undermaintained". However, existing developer experience stipulates that these actions can take up to several weeks.