
Dolibarr is an open-source ERP and CRM widely used by businesses for managing accounting, customers, inventory, and more. However, as the database grows and more features are enabled, Dolibarr may slow down, affecting user experience and productivity.
Optimizing Dolibarr's performance helps speed up load times, improve system responsiveness, and ensure smooth usage. In this article, we share the best practices to optimize Dolibarr and get the most out of your installation.
1. Choose a High-Performance Hosting Provider
Hosting plays a crucial role in Dolibarr’s performance. An undersized or poorly configured server can significantly slow down the application.
???? Tips for fast and reliable hosting:
✔ Choose a VPS or dedicated server instead of shared hosting.
✔ Opt for SSD NVMe disks, which are much faster than traditional HDDs.
✔ Ensure your server has sufficient RAM (at least 2GB for basic use, more if your database is large).
✔ Check the PHP and MySQL/MariaDB versions – Newer versions offer notable performance improvements.
2. Keep Dolibarr Updated
Every new version of Dolibarr includes optimizations and bug fixes that can enhance performance.
???? How to safely update Dolibarr?
1️⃣ Back up your database and Dolibarr files before updating.
2️⃣ Check the official documentation for version compatibility.
3️⃣ Follow the official update instructions carefully.
4️⃣ Verify that all modules and extensions work correctly after the update.
3. Optimize the Database
Dolibarr stores a large amount of data in its MySQL/MariaDB database. A poorly optimized database can significantly slow down the system.
???? Tips for database optimization:
✔ Regularly clean old data (obsolete invoices, unnecessary logs, etc.).
✔ Enable MySQL caching to avoid repeated queries.
✔ Use the OPTIMIZE TABLE
command to reorganize tables and improve data access speed.
✔ Activate query caching to speed up frequently used queries.
???? Advanced Tip: Use InnoDB instead of MyISAM for MySQL tables, as it performs better on large databases.
4. Enable and Configure Dolibarr’s Cache
Dolibarr has an internal caching mechanism that can be enabled to reduce load times.
???? How to enable caching?
1️⃣ Go to Configuration > Miscellaneous in Dolibarr.
2️⃣ Enable the CACHE_EXPIRE option and set a reasonable value (e.g., 3600 seconds).
3️⃣ Ensure the cache is stored in a fast directory (avoid slow file systems).
???? Additional Option: Use Redis or Memcached to store caches in memory and improve execution speed.
5. Use a High-Performance Web Server
The choice of web server can significantly impact Dolibarr’s speed.
???? Which web server to choose?
✔ Nginx is more efficient than Apache for high-traffic sites, as it consumes fewer resources and handles simultaneous connections better.
✔ Apache with mod_pagespeed automatically optimizes static resources.
✔ Enable Gzip compression to reduce file sizes sent to users.
6. Reduce the Number of Enabled Modules
Every active module in Dolibarr adds additional queries and makes the interface heavier.
???? Module optimization tips:
✔ Disable all unused modules in the Dolibarr admin panel.
✔ Prefer well-optimized modules that are regularly updated.
✔ Test performance after enabling each module to identify any slowdowns.
7. Configure PHP for Better Performance
PHP is Dolibarr’s engine, and poor configuration can cause unnecessary slowdowns.
???? Recommended PHP optimizations:
✔ Use PHP 8.1 or later (for better performance and security).
✔ Enable OPcache (opcache.enable=1
in php.ini
) to store compiled PHP code in memory.
✔ Increase memory allocation (memory_limit=256M
at minimum).
✔ Set max_execution_time
to 60 seconds to prevent timeouts on heavy processes.
8. Use a CDN for Static Resources
A Content Delivery Network (CDN) helps distribute static files (images, CSS, JS) via global servers, reducing the load on the main server.
???? Benefits of a CDN:
✔ Faster page loading.
✔ Fewer requests to the main server.
✔ Improved user experience, especially for users far from the origin server.
???? Popular CDN services: Cloudflare, Amazon CloudFront, BunnyCDN.
9. Monitor Performance and Identify Bottlenecks
???? Tools to analyze Dolibarr’s performance:
✔ MySQL Slow Query Log – Identifies slow queries that need optimization.
✔ New Relic – Provides real-time PHP script performance analysis.
✔ GTmetrix / PageSpeed Insights – Measures page load speed and suggests optimizations.
✔ Dolibarr Logs – Helps detect system errors that may slow down the application.
10. Automate Maintenance and Monitoring
???? Best practices for long-term performance:
✔ Schedule automatic database optimization once a month.
✔ Monitor CPU and RAM usage to prevent server overloads.
✔ Perform load testing before adding many users.
✔ Automate backups to prevent data loss in case of crashes.
Conclusion
Optimizing Dolibarr’s performance is essential for ensuring smooth and efficient usage of the ERP system. By following these 10 tips, you will reduce load times, enhance user experience, and prevent slowdowns that affect productivity.
???? Summary of best practices:
1️⃣ Choose high-performance hosting
2️⃣ Regularly update Dolibarr
3️⃣ Optimize the database
4️⃣ Enable and configure caching
5️⃣ Use a fast web server
6️⃣ Disable unused modules
7️⃣ Properly configure PHP
8️⃣ Implement a CDN
9️⃣ Monitor performance
???? Automate maintenance