• Resolved jmires

    (@jmires)


    We have an issue where the post listing page (/wp-admin/edit.php) has been taking 30-40 seconds to load. Certain single-post pages on the user-facing front end are also taking a long time to load.

    If we disable Yoast, everything goes back to being near-instant.

    We use advanced custom fields fairly heavily, with several post types having various custom fields attached to them.

    I’ve read other posts on this and one fix that seems to work frequently is Tools > Optimize SEO Data. We have tried that but just repeatedly get the error “Oops, something has gone wrong and we couldn’t complete the optimization of your SEO data. Please click the button again to re-start the process.”

    We meet the minimum system requirements, are using the latest versions of WordPress and Yoast, and all other plugins and themes are up to date:
    PHP 5.6.40
    MariaDB 10.3
    Wordpress 5.7.2
    Yoast SEO 16.4

    We use a custom theme we coded ourselves and while it is old, it’s a very simple theme that generally only uses basic WordPress core functions. Its main purpose is front end styling and back-end integration with our custom login and subscription system.

    I have seen that you often advise disabling other plugins and/or switching to a default theme like Twenty Twenty to see if the problem persists. We can’t do that because we’re on a production site with fairly high traffic. You usually suggest using the Health Check plugin to allow testing that without affecting the front end for other users, but we cannot run that part of the Health Check plugin because it requires FTP credentials and our server is locked down to FTP access (only available via SSH with keys).

    What is the next step to try to get to the bottom of this?

    Thanks in advance for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @jmires,

    Thanks for sending details about what you’ve already done to troubleshoot this problem. The edit screen shouldn’t take that much time to load and the SEO data optimization should complete.

    Here are a few more things to check:

    1. Can you let us know how many ACF custom field values are on a typical page and what field types you’re using?

    2. Check for JavaScript errors in the console on the edit screen. If you find them, please send a link to a screenshot.

    3. Check your PHP error log for any error messages triggered while editing a page. You can do this by enabling WordPress debugging or contact your web host.

    4. Can you give us more details by installing the Query Monitor plugin? Please go to a page where the problem is happening and check for any errors or slow queries. Are there any warnings related to Yoast SEO?

    5. If you’re not able to use the Health Check plugin or deactivate plugins during a maintenance window on your production site, we recommend testing on a staging site. See our guide for checking for conflicts.

    6. We see that your site is running PHP 5.6, but this is not the recommended version. PHP 7.4 is now the minimum requirement for WordPress WordPress and PHP 5.6 has already reached its end of life.

    Thread Starter jmires

    (@jmires)

    Hi Priscilla,

    Thanks so much for helping to troubleshoot this! To clarify, it’s not always editing a post (i.e. /wp-admin/post.php?post=27862&action=edit) where the extreme slowness occurs. Where we often see it is on the post list page in the in admin area, so URLs like /wp-admin/edit.php or /wp-admin/edit.php?post_type=our_custom_type — though we do see it on other post-related admin pages and on the user-facing front end.

    To answer your specific questions:

    1. On the WordPress default post type, we don’t use any custom fields, but we do see the problem when loading the default post type listing page, and on the user-facing end when loading the single-article view for some posts (but not all posts!). It’s always the same posts that are slow, in both the admin area and the user-facing end. We have about 10 custom post types, and those typically have 3-5 custom fields each – mostly selects and true/false fields.

    2. There are no console errors on any pages where we see the issue.

    3. There are no PHP errors on any pages where we see the issue. There are a few notices, but no errors.

    4. Query monitor doesn’t show any slow queries, but shows thousands and thousands of queries on pages with the slow loading. Here’s an example of loading the “All Posts” page for the default post type: https://img-33.s3-us-west-1.amazonaws.com/2021-06-14-at-10-35-37.png. As you can see – over 50 seconds to load the page, with 18 thousand queries.

    For the most part there aren’t database errors, but the handful that are present are Yoast-related. It is always the same one, an “INSERT INTO wp_blog_yoast_indexable…” where the error message is “Unknown column ‘estimated_reading_time_minutes’ in ‘field list'”.

    We have some custom post type pages that load normally (about 1 second) and run about ~40 queries. All of the pages that are slow run about 18,000 queries.

    5. We’ve run everything against our staging site, but unfortunately we don’t experience the problem there in the first place, and we were able to run SEO Optimization there without any problems. The DB tables for WordPress are not kept in sync between staging and production, so it’s an apples to oranges comparison.

    6. Yeah, we haven’t been able to update to a more recent version of PHP because we have a lot of legacy custom code and third party libraries in other areas of the site that need updating in conjunction with the PHP upgrade. It’s on our roadmap to update to 7.4 this summer. But even so, 5.6.40 is still within the minimum requirements for both WordPress core and Yoast wordpress-seo, so I think it should still function?

    Thanks for your assistance!
    Jon

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    Thank you for providing all of those details. We understand that the posts list overview page is where it takes quite some time to load due to all of the queries, and it seems that a majority are related to the indexables and the estimated reading time.

    You mentioned that you are unable to complete the SEO data optimization. Is there any JS error that appears in the browser’s console when you try to run it?

    Can you please try resetting our indexables in the database tables by following the steps below?

    1. Install & activate the?Yoast Test Helper plugin
    2. Go to Tools > Yoast Test
    3. Locate the Yoast SEO section and click on the ‘Reset indexables tables & migrations’, ‘Reset Prominent words calculation’, and ‘Reset Internal link counter’ buttons. After each click, the page will reload to confirm that each reset was successful. Note: this won’t actually erase your SEO data, which is also stored in WordPress’ default tables. It’ll just reset our index (custom tables) for that data.
    4. Go to SEO > Tools, and under SEO data, click the “Start SEO data optimization” button to allow Yoast to rescan your?content.

    For your site’s health and safety, we recommend creating regular backups of your site and database. This is especially important before installing, updating, or removing plugins. Learn more about the benefits of regular backups.

    You can learn more about it here – https://yoast.com/help/seo-data-optimization-not-complete-successfully/

    After completing the SEO data optimization process, could you then check if this resolves the issue with the slow loading time for your posts overview page?

    Thread Starter jmires

    (@jmires)

    Michael,

    Thanks so much – this fixed it! The “All Posts” page that was taking 50 seconds to load and running 18,000 queries now loads in under a second with ~50 queries.

    For those with a similar issue, the fix was:

    1. Install Yoast Test Helper plugin
    2. From the SEO section of Yoast Test, do ‘Reset indexables tables & migrations’, ‘Reset Prominent words calculation’, and ‘Reset Internal link counter’
    3. Go to SEO > Tools and run SEO Data Optimization (it completed this time)

    Michael, to answer your question about JS errors when trying to run SEO Optimization: before the fix, when SEO optimization wouldn’t complete, I didn’t get JS errors but the ajax calls were as follows:

    1. a POST to /wp-json/yoast/v1/indexing/prepare that returned {"objects":[],"next_url":false}
    2. a POST to /wp-json/yoast/v1/indexing/terms that also returned {"objects":[],"next_url":false}
    3. a single POST to /blog/wp-json/yoast/v1/indexing/posts that resulted in a 500 error

    Thanks again – really appreciate the assistance!
    Jon

    Hello,

    I have kind of the same problem, however it affects all my admin part. I can even do what you recommend, as I need to deactivate the plugin to load pages. And when I am trying to activate it again, it takes so much time for it to work. Is there another solution ?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Admin post listing very slow with Yoast enabled’ is closed to new replies.