Guy Rutenberg

Keeping track of what I do

Archive for the ‘Wordpress’ Category

Improved FTP Backup for WordPress

with 25 comments

This script backups both the database and files of a WordPress blog into a remote FTP server (while keeping a local copy). It’s an update of my WordPress Backup to FTP script. The main changes are auto-detecting database settings and better support for caching plugins (specifically WP-Cache). The new version makes it easier to backup multiple WordPress blogs to the same FTP server.
Read the rest of this entry »

Written by Guy

February 28th, 2010 at 8:38 am

Posted in Bash,Projects,Wordpress

Tagged with , ,

RTL and Hebrew Adaptation of the Fusion WordPress Theme

with 4 comments

I’ve ported the Fusion theme by digitalnature to RTL, and adapted it to Hebrew.

screenshot
Read the rest of this entry »

Written by Guy

August 15th, 2009 at 8:52 am

Posted in Wordpress

Tagged with , ,

Sociable Plugin Doesn’t Play Nice

with 2 comments

I’ve been using the Sociable plugin for adding easy “share” links to the bottom of my posts. Up until yesterday I’ve been using the 2.x versions of the plugin, but yesterday I’ve upgraded to 3.4.4. Today I’ve noticed to my surprise that the plugin automatically adds a box to my admin dashboard with “The Latest news from Yoast”, Yoast beeing the plugin’s maintainer, Joost de Valk, blog. The plugin itself doesn’t feature any way to completely disable this “feature”. One has to hide it using the dashboard settings. While this may seems benign, in my opinion its pushing the limit. If I’m interested in getting updates from that blog, I would sign up to its RSS feed. I don’t like getting “free” functionality not advertised in the plugin description.

I must add that as a user of the Sociable plugin, I’m more than satisfied. I probably won’t stop using the plugin just because of this issue, but it still seems to me like improper manners.

Written by Guy

August 12th, 2009 at 11:48 am

Posted in Wordpress

Tagged with

WordPress Backup to FTP

with 21 comments

Update: A newer version of the script is available.

This script allows you to easily backup your WordPress blog to an FTP server. It’s actually a modification of my WordPress Backup to Amazon S3 Script, but instead of saving the backup to Amazon S3 it uploads it to an FTP server. Another update is that now the SQL dump includes the database creation instructions so you don’t need to create it manually before restoring from the backup.

Although I’ve written it with WordPress in mind (to creates backups of my blog), it isn’t WordPress specific. It can be used to backup any website that consists of a MySQL database and files. I’ve successfully used it to backup MediaWiki installation.
Read the rest of this entry »

Written by Guy

January 6th, 2009 at 4:46 pm

Posted in Bash,Wordpress

Tagged with , ,

WordPress Backup to Amazon S3 Script

with 17 comments

This is an updated version of my WordPress Backup Script. The new version basically does the same thing: backup up a wordpress blog (actually any site that consists of files and a MySQL database). The new thing about the script is that instead of only saving the backup locally, it also uploads it to Amazon S3.

Read the rest of this entry »

Written by Guy

October 11th, 2008 at 12:19 pm

Posted in Bash,Wordpress

Tagged with , ,

Clean URLs (Permalinks) for WordPress on Lighttpd

with 38 comments

I’ve moved my blog in the last few days to a new bigger dedicated server (as well as some other sites I own). After doing some benchmarks (I plan to post those soon) I’ve decided to switch to Lighttpd. While the exact migration notes are the topic of another post, I can say that I’m fairly satisfied with the move.

After setting up the server, I started moving the blog. Importing the files and the database was pretty straight forward. But when I thought every thing is ready and I transfered the domain to the new server I’ve found out that none of my inner pages are accessible. The reason, as it turned up pretty quickly, is that the WordPress depends on Apache’s mod_rewrite to create the clean URLs (the so called permalinks). This actually posed two problems:

  1. WordPress depends on Apache’s mod_rewrite.
  2. WordPress used .htaccess files for the clean URLs configuration

Read the rest of this entry »

Written by Guy

May 24th, 2008 at 10:43 am

Posted in Tips,Wordpress

Tagged with ,

WordPress Backup Script

with one comment

This is a small script I’ve written to automate my server-side backups of my blogs. It creates a backup of both the database and the actual WordPress files.

#!/bin/bash
 
# (C) 2008 Guy Rutenberg - http://www.guyrutenberg.com
# This is a script that creates backups of blogs.
 
DB_NAME=guy_blog
DB_USER=guy_root
DB_PASS=****
DB_HOST=localhost
 
#no trailing slash
BLOG_DIR=/home/guyru/guyrutenberg.com
BACKUP_DIR=/home/guyru/backups
 
 
echo -n "dumping database... "
mysqldump --user=${DB_USER} --password=${DB_PASS} --host=${DB_HOST} ${DB_NAME} \
 | bzip2 -c > ${BACKUP_DIR}/${DB_NAME}-$(date +%Y%m%d).sql.bz2
if [ "$?" -ne "0" ]; then
	echo -e "\nmysqldump failed!"
	exit 1
fi
echo "done"
 
 
echo -n "Creating tarball... "
tar -cjf ${BACKUP_DIR}/${BLOG_DIR##*/}-$(date +%Y%m%d).tar.bz2 ${BLOG_DIR}
if [ "$?" -ne "0" ]; then
	echo -e "\ntarball creation failed!"
	exit 1
fi
echo "done"

Read the rest of this entry »

Written by Guy

May 7th, 2008 at 11:15 am

Posted in Bash,Tips,Wordpress

Tagged with ,

Hidden Spam Links in WordPress

with 3 comments

About a week ago, I’ve decided to look at the HTML source of my blog. I was in total shock to find a spam link hidden there. This is how it looked:

<!-- ocadia theme credits, downloaded from wpthemesfree.com -->
<u id="ocadia" style="display: none">Buy some <a href="http://detoxbuddy.com/categories/191.html">marijuana drug testing</a> products</u>

Ocadia is the name of theme I’m using, so I guessed the hidden link came from there. I was partially right. The code indeed resided in the index.php file of the theme, but as I later found out, the theme had nothing to do with that. I removed link and the comment immediately, and went to see if the it was distributed this way from Beccary (the author of the theme.
Read the rest of this entry »

Written by Guy

April 5th, 2008 at 12:08 am

Posted in Wordpress

Tagged with