plugin

All posts tagged plugin

Memory leaks caused by PHP are hard to pinpoint. My server started crashing regularly, out of memory from running WordPress on Apache22 and FreeBSD. It happens especially when posting, but also at random times. I tried disabling plugins, changing the theme, to no avail. There might be more than one faulty script, and there is little hope to find these leaks. Hopefully they will be plugged in future releases. In the mean time, I wrote a Python script that checks memory status and restarts Apache if needed. Placed on a cron job, it runs every ten minutes on my server.:

It is a temporary fix, but it works. Her is my /etc/crontab line:
*/0 * * * * root /usr/local/bin/python /home/gil/scripts/mleaks.py

Good luck!

I just discovered the Pretty Link WordPress plugin, and I think it will help getting more returning visitors to my site, especially using the Pretty Bar feature. Problem is, I have 11,000 posts, with almost as many links. So, I wrote a Python Script to convert all your old post links to Pretty Links. You need to insert your database login on lines 23,24,25,26. Replace ‘planenews’ on line 49 by your site name, without the .com. Replace my domain by yours on line 58. If you leave line 69 as it, the script will set your Pretty Links to show with the Pretty Bar, standard parameter forwarding, group 1, traking on. If it works for you, you better send me a few bucks to buy a Cigar or a Cointreau, because this will save you a lot of time! (Click on the Donate button below), Scroll down to get the code…






Update: You may have to run it a few times until the script returns no result.. No time to figure out why.. Make sure you backup your database before playing with this!

I had problems with the Google XML sitemap generator plugin because of my database size, more than 10,000 articles. Here is a Python script that will work no matter how large your database is. Make sure you edit the domain name at the end, for the home page entry, path to the sitemap.xml file, and of course, put in your database login info. Put the script on a cron-job, et voila! See the code below…