Hello,
Since there is no documentation yet, i provide this short one which helped reproducing a working system with content_sync.
Can be changed and added as a Documentation if wanted.
Content Synchronisation
Migrating Content to new Site
1) Download Content Synchronisation Module via composer
composer require content_sync
or via Drupal Backend
2) Activate module content_sync with drush
drush en -y content_sync
This may take a while
3) Set the export directory in settings.php. Similar to configuration management, we want to set the export directory for YAML files using the settings.php file.le:
Use the variable: $content_directories['sync'] ie:
global $content_directories;
$content_directories['sync'] = $app_root.'/../content/sync'; Note: set $content_directories as global
4) Create content/sync directions above youre webroot folder.
mkdir content
cd content/
mkdir sync
5) Give content/ and all subfolders 777 rights.
chmod 777 -R content/
6) Repeat Step 1) - 5) on Destination Environment
Exporting / Importing
!Before Starting : Switch to a Basic Theme (f.e. Bartik), disable Aggregate CSS files and Aggregate JavaScript files.!
Increase post max value and resource limits in your php.ini(
max_execution_time = 600
max_input_time = 600
max_input_vars = 4000
memory_limit = 192M)
Comments
Comment #2
avpadernoComment #3
blanca.esqueda commentedThank you!
I'll include this guide along with the content sync drush documentation.
https://www.drupal.org/docs/8/modules/content-synchronization
I'm wondering about this note:
did you face an error if not on the basic theme or CSS/JS aggregation disabled? In theory that shouldn't be necessary,it is why I'm wondering if there were some errors.
Comment #4
blanca.esqueda commentedComment #5
megan_m commentedI think it should be much more clear that the module is going to generate the yml files when you enable it. That didn't happen for me the first time in enabled it and I didn't understand why I couldn't export anything.
And actually this is what happened: https://www.drupal.org/project/content_sync/issues/3134102
Comment #6
blanca.esqueda commented