Check for Big File

I got quota warning email sent to my email. Exceed 80% of quota already but since I never add any new file and database grow also not significant I decide to find out if cpanel system  add something that I don’t know.

Error log is responsible for this problem.

# ls -l | grep log
-rw-r–r– 1 externa2 externa2 346169667 May 1 15:57 error_log
-rw-r–r– 1 externa2 externa2 274 Dec 14 06:29 wp-blog-header.php
-rw-r–r– 1 externa2 externa2 27695 Dec 14 06:29 wp-login.php

As you see I have around 346 MB size of error log file.

Empty this file and I have spare room 🙂

#echo ‘ ‘ > error_log

P.S : in case of you want to know what kind of error that might cause your log file got bigger in size you can use tail -f command.

# tail -f error_log

voila ….

[01-May-2012 23:08:04] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ORDER BY `meta_count` DESC LIMIT 5’ at line 1 for query SELECT `meta_value`,`meta_count` FROM `wp_stt2_meta` WHERE `post_id` = ORDER BY `meta_count` DESC LIMIT 5; made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, apply_filters_ref_array, call_user_func_array, relevanssi_query, relevanssi_do_query, relevanssi_do_excerpt, apply_filters, call_user_func_array, pk_stt2_admin_content_filter, stt_terms_list, pk_stt2_db_get_search_terms
[01-May-2012 23:08:04] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ORDER BY `meta_count` DESC LIMIT 5’ at line 1 for query SELECT `meta_value`,`meta_count` FROM `wp_stt2_meta` WHERE `post_id` = ORDER BY `meta_count` DESC LIMIT 5; made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, apply_filters_ref_array, call_user_func_array, relevanssi_query, relevanssi_do_query, relevanssi_do_excerpt, apply_filters, call_user_func_array, pk_stt2_admin_content_filter, stt_terms_list, pk_stt2_db_get_search_terms

Wow, this plugin need to deactivate as I don’t use it intensively.

P.P.S :

Those command is command line that you can use as long your web host support ssh access. For a list of web host that offer ssh access you can access resources section.