Syndication between installations
This page is for integrators whose landscape has several Exponential installations that must share content: a
group site and its member sites, a portal network, a central product catalog published on several shops. The
syndication extension (required by the root composer.json as ~1.3.14) exports part of one installation's
content tree as a feed and lets another installation import it, kept in step by cron. The feature page is
syndication; every option is in the
specification.
Warning
.htaccess slows down every request. When .htaccess files are enabled (AllowOverride anything but None), let alone
used, Apache looks for them and reads and evaluates them on every request, in every directory of the path, and
page loading times go up drastically (measured). The only real fix is to switch the feature off for
the virtual host: AllowOverride None in the HTTPS virtual host, and the rules in the virtual host's own
configuration as mod_rewrite rules. That is far faster in production speed tests and well worth the time it takes
to optimize a production configuration. Switch over right away: copy the rules of the
example HTTPS virtual host into your virtual host (with the static cache, also
staticcache_offload.conf), set AllowOverride None, run apachectl configtest, reload Apache and
test the site. The same rules for other servers: nginx, LiteSpeed,
Caddy, IIS, Velocity (built in); where virtual host rules go in a control
panel: Plesk, cPanel, DirectAdmin, ISPConfig.
On LiteSpeed or OpenLiteSpeed, the server's own page cache can also answer anonymous visitors and crawlers without PHP: Page caching with LiteSpeed and OpenLiteSpeed.
Contents
How it works
main installation second installation
----------------- -------------------
export feed (a subtree) import (feed address + target node)
| cronjob part export_feed ^ cronjob part import_feed
v |
cached XML + binary files, one file per object ---> SOAP request to the main installation
served through index_soap.php (EnableSOAP=true)- One-way syndication: shared content or authentication data between separate databases and client sites.
- Two-way syndication: each side exports and imports, for forums, portal networks and large e-commerce networks.
Setting it up
On both installations:
Install the extension's tables (
sql/mysql.sql, orshare/db_schema.dbafor every database since 1.3.1) and activate it.Switch the SOAP server on for the exporting side, in
settings/override/soap.ini.append.php:[GeneralSettings] EnableSOAP=true [ExtensionSettings] SOAPExtensions[]=syndicationLet the SOAP server through the exporting side's web server. It is
index_soap.phpsince Exponential 6.0.15 (soap.phpbefore; that name only forwards now): uncommentRewriteRule ^index_soap\.php - [L]in.htaccess, or add the line to the HTTPS virtual host, or alocation = /index_soap.phpin nginx.curl -i https://<host>/index_soap.phpmust answer "only understand POST methods", not404or a page of the site. The lines for each server and the full test are on the SOAP entry script is now index_soap.php.
On the main installation: open /syndication/menu, choose Export, then New Feed, and complete the wizard.
A subtree source includes the subtree root. Schedule the export part; every 3 minutes is suggested:
php runcronjobs.php export_feedOn the second installation: open /syndication/menu, choose Import, give the feed's server address
(https://export.example.com/index_soap.php, or .../soap.php when the main installation runs 6.0.14 or older) and
the node that receives the content, and run the import part by hand first:
php runcronjobs.php import_feedReview the first import, then schedule it. After the first run, imports are faster.
Protecting the source
Since 1.2.0 the import sends a login and password, so the exporting site's SOAP endpoint can sit behind HTTP access
control. Give them in the server address (https://<login>:<password>@<host>/) or in the Login and Password
fields of the import's first step. The port defaults to 443 for https. Keep these credentials out of version
control, and restrict index_soap.php (and soap.php, while any import still calls it) to the addresses of the
importing installations at the web server.
Operating it
The Syndication start page in the administration shows what is exported and imported, when each cronjob part last ran, and what needs attention (a feed without a source, an import without a location, failed items, SOAP off). Export all active feeds and Fetch all active imports start the cronjob code in the background with progress on the page.
From the shell (php bin/php/console list ext:syndication):
php bin/php/console ext:syndication:status
php bin/php/console ext:syndication:export --dry-run
php bin/php/console ext:syndication:import --import=3 --fetch-onlySyndication or something else
| Situation | Choose |
|---|---|
| Installations share a subtree continuously | syndication |
| A partner site only shows headlines | An RSS export (feeds) |
| Move a site or a subtree once | A package (packages) |
| Another system that is not Exponential reads the content | The REST API or expservices |
| One installation serves several sites | Not syndication at all: siteaccesses of one installation (multi-site planning) |
Checklist
- To do: Tables installed and the extension active on every installation involved.
- To do:
EnableSOAP=trueandSOAPExtensions[]=syndicationon each exporting installation. - To do: The SOAP endpoint protected (HTTP authentication, address restriction, HTTPS).
- To do:
export_feedandimport_feedscheduled; the first import reviewed by hand. - To do: Monitoring on the parts' last run (the Syndication start page,
ext:syndication:status).
Related pages
- syndication and its specification
- WebDAV and SOAP
- Cronjobs for integrations
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.