• According to Query Monitor, your plugin had a slow query that is running everywhere on the WordPress backend, instead of just on the locations where it is needed. eg even on Dashboard & plugins page you are query the Posts table for media files which is not needed. There is not need to run the scripts unless someone is interacting with media and definitely no need for you to be querying the database for all attachments.

    the slow query is
    SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
    FROM keb_posts
    WHERE post_type = ‘attachment’
    ORDER BY post_date DESC

    and it is caused by

    Easy_Media_Replace_Admin->enqueue_scripts()
    wp-content/plugins/easy-media-replace/admin/class-easy-media-replace-admin.php:132

    Please resolve and help us speed up our backend.

  • The topic ‘Query Slowing down WordPress backend’ is closed to new replies.