WordPress page takes more than 20 sec to load, high CPU for Apache HTTP Server

[ad_1]

Hi community, I would need some help with my WordPress because it is extremely slow:

\- every WordPress page takes more than 20 seconds to load

\- Largest Contentful Paint > 15

\- the database has 90 MB, but the queries are not running slow if I run them using PhpMyAdmin

\- time to first byte is about 7 seconds

\- I disabled each plugin (have about 50 active plugins) one by one and retested, but no improvement in performance

\- After working with WordPress for some minutes, Apache HTTP Server uses more than 50% of the CPU

\- I optimized database with WP-Optimize, but no performance improvements

\- Introduced caching, no performance improvements

\- using Porto Theme, executed their site speed wizard, no improvements

\- updated theme, updated all plugins, updated PHP version to 8.2, no improvements

Anything else I could try? Maybe to disable plugins from loading on specific posts and pages? Or trying to clean the database? Or moving to another web server like LiteSpeed ?

Where could the bottleneck be? Any ideas ??

Thank you!

[ad_2]
7 Comments
  1. Yikes 50 plugins?! Have you updated mysql or mariadb to the latest versions?

  2. You can use the Query Monitor plugin to figure out what is going on.

    Also, scan for malware, for example with Wordfence.

    Upload a simple static html file, and check if it loads fast. It bypasses WordPress and php. If it is also slow, you need a new host.

  3. I would try disabling half of the plugins and seeing page performance. Keep disabling half until you find the one that’s causing problems if it’s a plugin. Also try changing themes and loading the same page.

  4. Have you ruled out the theme? Have seen the Porto theme be a bit of a hog on resources a few years ago. If apache is using a lot of CPU, then perhaps the theme is performing requests in the backend to the server? Can you check the logs to see if the server’s IP address is accessing files on a visit of the home or gallery pages? Also worth checking if a lot of ajax requests are being made in developer tools when loading a page on the front end.

  5. What type of hosting plan do you have? Shared, VPS, or dedicated server? What are the specs of the server itself? The latest versions of Apache are not typically resource intensive, unless you are running on a small VPS with like 1-2 CPU and 1GB RAM. Have you checked to see if your site is being DDoSed? You say you have 50 active plugins, how many inactive do you have? Did you know that for every page load every plugin, active or not, is queried? You will need to completely uninstall any unused plugins to see a true speed boost.

  6. Install “LiteSpeed Cache” plugin, and activate Opcache and Memcached on your host (in cPanel > PHP settings). Then in LiteSpeed > Cache > Object Cache > enable Memcached..

    Then, disable your other caching and minify plugins. Enable all the Page Performance features for CSS, JS, and HTML in LiteSpeed instead.

    My pages went from 7-15secs down to 0.3-0.7secs. Huge improvement. And I’m using a cheap shared host.

    Also, in Settings > Write, delete the list of notification pinging services (I forget what it’s called, but it claims to broadcast to a bunch of services each time you publish something, it’s a huge source of slowdown).

  7. >*time to first byte is about 7 seconds*

    That means that the server is low on resources and is unable to serve the files in a timely manner. Low resources means either cheap shared hosting, or something is running on the server that’s chewing up CPU and/or RAM (can sometimes mean the server is compromised).

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer