Here’s a set of actionable recommendations and best practices, tailored for Elgg 6.2.4, based on your requirements:
Optimize Database (MySQL): Elgg heavily relies on the database for every page load. Make sure MySQL is properly tuned (memory allocation, cache size, query optimization). Upgrading hardware (AMP stack, SSDs) or moving to a more performant server/VPS helps if you suspect low I/O bandwidth.learn.elgg+1
PHP and Opcode Cache: Use PHP accelerators like OPcache or APCu to decrease script compile time.learn.elgg
Plugin Audit: Disable unneeded or heavy plugins. Some plugins (especially third-party) can slow Elgg dramatically.elgg
Webserver Choice/Config: Switching from Apache to Nginx may provide marginal performance improvements; ensure webserver settings are carefully reviewed.elgg
Caching: Check that Elgg’s built-in caching is enabled and leverage browser-side caching for static assets. CDN usage can help for static files.
Reduce External Calls: Minimize or optimize API calls and external data fetching in plugins or themes.
Available Plugins: A community solution/plugin can add an option to the file upload form, allowing file owners to mark files as “not downloadable.” This typically works by not registering the download button for that file object when display conditions are met.elgg
Custom Development: For more control, modify or extend the file plugin:
Add a metadata field (Boolean) during upload for download permission.
At file view, check this metadata: if download is disallowed, do not display the download link/button.
Adjust group and access checks accordingly, especially in closed groups.elgg+1
Access Levels: Elgg supports access levels (Public, Friends, Logged In, Group). Combine with custom logic for granular file control.elgg
Common Causes: Incorrect DB settings in settings.php (check dbhost, dbuser, dbpass, dbname), server timeouts, or hitting max allowed MySQL connections can cause intermittent outages.elgg+2
Special Note: Sometimes localhost in dbhost can fail—try using 127.0.0.1 or your server IP instead.elgg+1
Server Resource Limits: Review MySQL and server resource allocation; ensure MySQL and PHP are not killed due to memory or process limits, especially during heavy operations like invites.elgg+3
Recommended Practice: Keep a separate staging/test site (mirror production if possible) for manual testing of new plugins, configurations, or core upgrades. Always use dummy accounts and non-admin testers to verify UI, permissions, workflows, and plugin compatibility.learn.elgg
Automated/Unit Tests: Leverage Elgg’s PHPUnit-based test suite for core and plugin automated tests to reduce manual testing workload. End-to-end tests should be run on staging to verify integrations.learn.elgg
Testing Access/Permissions: Manually verify file permissions, closed group access, and upload/download rules with multiple user roles and groups.learn.elgg
| Issue | Solution/Advice |
|---|---|
| Website speed | Tune MySQL, optimize PHP, audit plugins, enable Elgg & browser caching, leverage hardware and server |
| Disable file download | Use plugin or code customization to add “disable download” at file upload (respect closed group logic) |
| DB connection cuts | Double-check DB config, increase server resources, use 127.0.0.1 not localhost, review process/memory |
| Manual testing | Use a test/staging site, run both manual and automated tests, test permissions as normal/non-admin users |
Consider regular backups and continuous integration/deployment for safer updates and rollbacks.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.