• Hello,

    From the front-end the site is fine – very fast – even searching 90K posts, using Solr, and it’s almost instantaneous – pingdom rates it as “faster than 97% of site tested”.

    But the back-end is another matter.

    Clicking on “pages” opens right up. Same with “posts” However when I try to add a new page, or post, it takes 3-5 minutes for the “add new page” to appear. Same when I try editing a page or post.

    Adding/removing plugins is slow as well – but not quite as slow – but definitely much slower than I’ve ever seen.

    No errors in my logs.

    I’m running an Ubuntu 14.04 VM, 64bit, with 7 cores, 4 gb ram, Apache2, PHP 5.5, MariaDB 10.x with a 1.7gb DB. The system load is .23%, memory usage 1%, hard drive is at 14.4%, and in my WP dashboard memory is showing 4.37 out of 256MB and being at 2% capacity.

    I have ALL plugins deactivated. I’ve rebooted numerous times and tried to add a new post right after a fresh boot. My server is bare-bones.

    I first noticed an issue with WP 4.2 but it wasn’t unworkable, but definitely showed signs of being slower.

    I’ve seen posts regarding this type of issue going back in the forums 8 years but can’t find a solution as most of those seemed to be plugin specific.

    Does anyone have any thoughts on this or similar experience?

    Thanks for any help!
    Rob

Viewing 12 replies - 1 through 12 (of 12 total)
  • Did you check your database with phpMyAdmin or whatever to make sure nothing has added zillions of records.

    A long shot, but there’s a database repair script you can run at:
    /wp-admin/maint/repair.php
    & follow the instructions.

    Thread Starter trident60

    (@trident60)

    Hey Lorro,

    Thanks for the tip!

    I hadn’t actually checked the size…but, while it’s pretty hefty at 1GB, it’s all my posts. And I’m running MariaDB – which is blazingly fast compared to Mysql – and I wasn’t having this problem a month ago.

    Just FYI for anybody else that might have an idea…I took a server image from 5 weeks ago, created a new VM with it, and it worked fine – until the WordPress updates. So for those that say the updates are not the cause…;)

    1Gb sounds 10 to 100 x what it should be even with lots of posts. Something wrong there I suspect. Consider trying this plugin to trim your database size:
    https://www.ads-software.com/plugins/rvg-optimize-database/

    There’s a long thread here about slow database queries following the recent update, albeit for a different query:
    https://www.ads-software.com/support/topic/woocommerce-extremely-slow-after-wordpress-42-update?replies=37

    There’s also this plugin: (and others similar)
    https://www.ads-software.com/plugins/query-monitor/
    which may give a clue about what’s taking the time.

    Thread Starter trident60

    (@trident60)

    Hi Lorro – nope, nothing wrong with the data or the db. It’s just how big it is…2.3 million rows, 225K images, 525mB of postmeta data mainly because I have many custom fields. And, this wasn’t built over time, this database came directly from Google – it’s very clean and it’s been optimized.

    Like I said, it was running fine for a long time with no issues at all…at one point it was even 50% bigger. And the front end works perfectly. I’ve put the db on a fresh install of 3.9 and it works fine.

    But thanks for that thread – I just posted on there as well!

    Rob

    Thread Starter trident60

    (@trident60)

    Hi Lorro,

    Just wanted to post this workaround that was in that other thread you posted for me.

    This issue is definitely impacting many people and, despite what many say, this is not soley a Woocommerce issue.

    So if anyone else out there is having this issue with WP 4.2.2 this is a “workaround”, and be aware that you are editing a WP core file (just commenting out a line – but I would download a copy of the original file prior to editing – just to be safe). I’ll just post this info from the other post:

    There still may be some tie into WooCommerce, though. That query is used for the custom fields metabox. It populates the Name dropdown menu for when you add a new custom field. On my site I’m seeing a bunch of WC SKUs in that menu, which I didn’t expect. They are all in the form of [SKU: 12345]. So maybe a site with a lot of products would be affected more.

    There has been some recent trac ticket activity regarding this issue. #32361 was closed as a duplicate of #24498, which has been hanging around for a couple years.

    Each of those tickets have different solutions. I tried both and they significantly reduce the load time for me. However, the one in #24498 eliminates the dropdown menu completely, so there may be problems with it.

    If you don’t care about that menu for adding a custom field, you can remove the database query completely and speed things up. Normally, you wouldn’t want to be editing WordPress core files, but this is just for a temporary workaround and testing purposes. All you have to do is comment out line 680 of /wp-admin/includes/template.php, like this.

    //$keys = $wpdb->get_col( $wpdb->prepare( $sql, $wpdb->esc_like( ‘_’ ) . ‘%’, $limit ) );

    Hi there,

    Here is a small fix that you can use in your theme.
    Just edit your functions.php, and insert these lines:

    add_action('admin_menu', '_tea_admin_menus');
    function _tea_admin_menus()
    {
        //Remove custom post fields box
        if (is_admin()) {
            remove_meta_box('postcustom', 'page', 'normal');
            remove_meta_box('postcustom', 'post', 'normal');
            remove_meta_box('postcustom', 'product', 'normal');
        }
    }

    In one of our cases, a website with 55k posts in DB and 785k comments, we’ve won 7sec per page.
    Hope it helps.

    Thread Starter trident60

    (@trident60)

    Hello ACH ??

    Thank you for the fix!

    I tried adding to the functions.php but unfortunately it didn’t change anything.

    But I appreciate the help!

    I am running into the same issues. The Backend is very slow while the front end is great. I am running woocommerce and a few other pulgins. Right after wordpress 4.2.2 update it really started being SLOW.

    Hello Trident,

    I just upgraded to 4.2.4 and had to rollback, because dashboard was way too slow…

    I suspect that could be something involving cache, are you using memcached by any chance?.. I’m really intrigated by what is going on, and will be troubleshooting it for now as well.

    thank you

    I have the same problem – have tried deactivating all plugins, cleaned up the database and sorted out cache and still slow. Any other ideas? Its’ driving me mad

    I have the same problem and everything times out while waiting so I can’t even get in to de-activate plugins or apply updates.

    I found an answer that should fix this issue!

    https://www.nex.be/press/2013/09/13/wordpress-admin-running-slow-heres-how-to-fix-it/

    The best way to find out db_version: (it’s the last column)

    https://codex.www.ads-software.com/WordPress_Versions

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘WP Backend is VERY slow – almost non-functioning’ is closed to new replies.