depicus

changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

  1. Stop WordPress asking for FTP details when installing plugins

    August 23, 2013 by The Man

    Very simple just ssh in and run the following

    sudo chown -R www-data:www-data /var/www

    or if you are on OS X (tested on Yosemite)

    sudo chown -R _www:_www /var/www


  2. Finding Spambots in your WordPress Database

    July 28, 2011 by The Man

    If you run a WordPress site you will know that spambots will try and post at an alarming rate to your site. Now there are plenty of spam filters but they don’t always catch users who register and do not post. I have hundreds of these spam users and wanted a quick way to find them.

    Well here is an SQL query to find users that have registered but not posted anything – note this is for WordPress used with bbPress

    SELECT * FROM wp_users WHERE 
    (SELECT Count(*) FROM wp_posts 
    WHERE wp_posts.post_author = wp_users.id) = 0
    

    Now I just need to find a way to bulk delete these users 🙂


  3. Assigning the return value of new by reference is deprecated in class.bb-install.php

    January 10, 2011 by The Man

    Quite easy to fix

    Open bb-admin/install.php and change
    error_reporting(E_ALL ^ E_NOTICE);
    to
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING);
    on line 3

    Open bb-load.php and change
    error_reporting(E_ALL ^ E_NOTICE);
    to
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING);
    on line 25

    Save and you are ready to go 🙂