Archives
Nginx: 403 Forbidden Error due to Corrupt WordPress Database
Optimize and Repair Corrupt MYSQL Databases mysqlcheck -uUSER -p –auto-repair –check –optimize –all-databases Note: The code will check > repair > optimize all the databases under the given USER. While playing with multiple cache plugins and memcached, don’t know how, but my wordpress database got corrupted. I noticed the error next day while submission of [...]
Feb 11th, 2012 | Filed under WordpressDelete Duplicate Posts in WordPress
Copy and paste the below code in “SQL” tab of your Phpmyadmin. DELETE bad_rows.* from <strong>wp_</strong>posts as bad_rows inner join ( select post_title, MIN(id) as min_id from <strong>wp_</strong>posts group by post_title having count(*) > 1 ) as good_rows on good_rows.post_title = bad_rows.post_title and good_rows.min_id <> bad_rows.id Note: In my case, table prefix is wp_
Jun 1st, 2011 | Filed under WordpressApprove all the pending comments in wordpress
We will use the following code in Mysql to approve all the comments in wordpress. Login to Phpmyadmin Select the wordpress’s database Go to ‘SQL’ tab and put the following code. UPDATE wp_comments SET comment_approved = 1; Note: The comments in Trash and Spam categories would also be approved, so keep them clean before issuing [...]
May 19th, 2011 | Filed under WordpressOptimizing wordpress sites
Optimize/ Tune WordPress for Better Performance Plugins to use: W3 Total Cache Optimize DB CSS Compress Javascript to footer Wp Smushit WP DBManager Autoptimize Enable the inbuilt wordpress cache using define(ENABLE_CACHE, true) Disable useless plugins and delete inactive ones. Use optimized wordpress theme with less PHP calls and images. Turn off pingbacks and trackbacks. Move [...]
Apr 16th, 2011 | Filed under Wordpress