Search code examples
mysqldatabasewordpresswordpress-theming

Large Error Log Generation due to repetitive error on Wordpress website


This is very specific question and need suggestion specific to my website or server only.

Website: www[dot]admission[dot]aglasem[dot]com

My error log size increases up to 4 GB in a day, it does not go beyond that, may be due to some restrictions.

I check the error log file and found a single error type logged repetitively

Here is the error-log part

WordPress database error Table 'asadm_main.wp_postmeta' doesn't exist for query

SELECT COUNT(meta_id)
FROM wp_postmeta
WHERE meta_key='_menu_item_menu_item_parent'
AND meta_value='64'

made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/magazine/magazine.php'), get_header, locate_template, load_template, require_once('/themes/magazine/header.php'), wp_nav_menu, walk_nav_menu_tree, call_user_func_array, Walker->walk, Walker->display_element, call_user_func_array, Walker_Nav_Menu->start_el, apply_filters('nav_menu_css_class'), call_user_func_array, astro_add_dropdown_class

I think this is theme specific issue. Can someone please explain what is going on and suggest me possible solutions for the same.


Solution

  • There is a lot we don't know based on your post.

    My guess is that you are using a plugin/theme that has hard coded "wp_" as the table prefix instead of getting it from the $wpdb variable...and that your table prefixes are NOT "wp_".

    If you NEED to use the offending plugin/theme...you might be able to get away by creating a view.

    CREATE VIEW wp_postmeta AS SELECT * FROM <put your actual postmeta table name here>