12

Hi I've installed CiviCRM on Wordpress. The Wordpress side of things run smoothly and fast. But inside the administration area of CiviCRM adding contacts, and any other administrative functions takes around 45 seconds or longer for a page to load or update after saving changes. I am currently using the 2013 Theme for Wordpress.

Are there any tips and tricks I can use to get the Civi side of the site to move faster? Thanks.

16

We struggled with this initially. Things we went through:

  1. Check the debug console in Chrome to make sure Civi isn't having trouble finding resources - look for 404s in the Source tab. This can slow down Civi tremendously as it waits for them to time out. Can be fixed in the Admin -> Resource URLs / Directories / Update Paths

  2. If you're running PHP 5.3, get APC cache. If you're on 5.5, turn on PHP Opcache (probably with this). With 5.4 you can install ZendOpcache, but if you can upgrade to 5.5 you probably should. This can make a huge difference.

  3. Disable all Civi extensions and see if speed is better. Then turn them on one by one to see if any in particular are being problematic.

  4. Ditto WordPress plugins. These can be deadly - we have a couple that are very heavy-duty (Admin Menu Editor Pro is great, for example, but can slow things down). I take the hit on them, but it's a close-run thing.

  5. Try disabling the cron job and restarting apache (or whatever), just to make sure that's not doing stuff that's slowing everything down.

  6. If you want to get really fancy, there's a WordPress plugin you can hijack to kill all WP plugins loading on certain Civi pages - instructions here.

  7. Also on the server, install memcache and turn on memcache support in the civi settings file. Honestly, this might just be placebo, but it seems a bit faster

  8. Might be worth optimizing the database tables in phpmyadmin, just in case those have gone wrong somehow.

  9. Civi 4.5+ is pretty snappy, so do update if you're still on 4.4.x. [Edit: some big sites have found upgrades to 4.6, then 4.7, then 5.0 continue to improve performance.]

  10. Turn off as many search options as possible in Admin -> Customize Data and Screens -> Search Preferences to see if any of those help (they never did for me, tbh, but others report good results).

  11. Turn off Smart Group caching on the above page by setting it to 0, in case it's running that every 5mins and dragging everything to a halt.

  12. If the issue is that your server is struggling, WP-Super-Cache does a good job of caching WordPress front-end pages so the server can focus on important stuff, and is very configurable.

  13. Make sure mysql caching is turned on.

  14. Check the mysql slow queries log to see if it's struggling to extract data. Normally this isn't a problem, but worth checking.

  15. If all else fails, you might just need hardware resources (memory and CPU), or a VPS, or a dedicated server. We moved onto the latter and it made a big difference.

  • This is a good answer to a shopping list of potential performance improvements, but not to the question asked. He's got a specific case where WP is working well, but Civi is not, so your answer 12. for example is not going to help and may potentially make things worse. – Alan Dixon Apr 19 '16 at 17:31
  • When we first installed Civi (back in the 4.1 days) it was far slower than WP, so this seemed a reasonable response. I've updated #12 to clarify I meant caching front-end pages, not anything in the admin. – Andrew West Apr 19 '16 at 17:35
3

I've sped up CiviCRM considerably by using NGINX over Apache, huge speed boost!

3

In general, the CiviCRM code is not that much slower than Wordpress, so something other than CPU is involved here. I'd suggest your two best lines of inquiry are:

  1. If the slowness is very specific to after saving a new contact or making changes, then either your SQL server has way too much caching, or else you have some kind of slow extension/customization that is executing after the save (e.g. perhaps you've got geo-coding turned on and it's failing to communicate with that external service - many providers tend to block or slow down outgoing http requests, I've noticed).

  2. If the slowness has no particular pattern to it, then it might be just running out of RAM (i.e. server memory). When that happens, servers get super slow as they swap stuff in and out to disk.

In any case, your first step is to get more diagnostic material. DON'T just start trying random fixes recommended by your brother-in-law - chances are that you could be muddying the waters and making things worse (or maybe that's how you got into this in the first place ...).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.