wordpress

GPL and the Wordpress x Thesis theme issue

Posted in licenses, wordpress on July 15th, 2010 by fseek – 10 Comments

Quick update: It seems that Thesis is actually using parts of the GPL Wordpress code. I don’t have access to the code now, but if they are using, then Matt is right and Thesis is violating the GPL. If they are not using Wordpress code (just the API calls), then my argument remains.

I am hearing a lot about the dispute between Matt Mullenweg (from Wordpress) and Chris Pearson (from the Thesis theme).

You can listen/read about the dispute here:http://mixergy.com/chris-pearson-matt-mullenweg/

The issue is that Matt (and a big part of the open source/Wordpress community) thinks that themes should follow the same license as Wordpress itself (GPL), while Chris thinks he can use any license he wants.

There is one big thing about this debate that most people are missing: The issue is not about the GPL or about what Wordpress thinks, but about what a derivative works means and if a theme is a derivative work or not. That’s what the GPL says:

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.
But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

 

If Thesis is not a derivative work from Wordpress, it doesn’t have to follow the same license as Wordpress. Linux modules doesn’t have to be under the GPL just because Linux itself is licensed under it (in fact, there is many closed-source Linux modules out there). If a software just uses a public API (which could be considered the same as executing commands on the terminal), it is not a derivative work. It merely integrates with that software.

A few facts:

1-Thesis do not include any software from Wordpress.
2-Thesis do not distributes any part of Wordpress.
3-The code is based on their open/public API, used to integrate the Theme with Wordpress.

How can that be different from me running a command on my bash terminal or using Linux? Nothing.

Also, in the interview, Matt mentioned that “GPL won” a few cases against Cisco (and other big companies), but in none of the cases so far the dispute was over the slim line of a derivative work. They were using and selling an open source software and not following the license. Different then Thesis that does not distributes Wordpress.

Yes, you can see that I agree with Chris on this issue. I don’t know him or ever used the Thesis theme. I am big open source fan, but we have to be fair.

Mail function missing – Wordpress error

Posted in tips, wordpress on April 27th, 2010 by fseek – 1 Comment

Are you getting this error when trying to reset a password (or send an email) on Wordpress?

The e-mail could not be sent.
Possible reason: your host may have disabled the mail() function…

If you are on a VPS/Private server, it probably means that you don’t have mail/sendmail installed. To fix it, run as root:

# yum install mailx
# yum install sendmail

If you are not on a VPS, call your hosting company or check your php.ini to see if the mail function is disabled:

disable_functions = mail

If it is, disable the “mail” from there…

htaccess to redirect your feeds to Feedburner

Posted in apache, tips, wordpress on March 3rd, 2010 by fseek – Be the first to comment

How to redirect your feeds to Feedburner without any plugin

Using Wordpress 2.9, I tried a few plugins to redirect all my feeds to feedburner, but Google Reader would still add the local feed automatically. The only solution that worked was from:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(feed|wp-atom|wp-feed|wp-rss|wp-rdf|wp-commentsrss)(.+)\ HTTP/ [NC,OR]
RewriteCond %{QUERY_STRING} ^feed [NC]
RewriteCond %{HTTP_USER_AGENT} !^(FeedBurner|FeedValidator) [NC]
RewriteRule .* http://feeds.feedburner/fseekme [R=307,L]
RewriteRule ^comments/?.*$ http://feeds.feedburner.com/fseekmecomments [L,R=302]

So, if you have the pretty URLs, just add the above (in bold) to your .htaccess file. Simple and easy!

Fixing XML Parse Error on your Wordpress RSS Feed

Posted in tips, wordpress on March 3rd, 2010 by fseek – Be the first to comment

XML Parsing Error: XML or text declaration not at start of entity
Location: http://xx.com/feed/

Line Number 2, Column 1:<?xml version=”1.0″ encoding=”UTF-8″?>
^

Are you getting this kind of error on your Wordpress feed? Well, I was having the same issue and took a while to figure it out. I spent quite a time on Google and nothing worked… Hopefully this will work for you.

1-Open your the file wp-includes/feed-rss2.php

Add the following code on line 10 (just after more=1):

$out = ob_get_contents();
$out = str_replace(array(“\n”, “\r”, “\t”, ” “), “”, $input);
ob_end_clean();

*I took this code from: w3it.org. However, just doing that didn’t work. Keep reading…

2-Edit your wp-config.php file and add a blank line at the bottom

Wordpress caches some PHP files, but if you edit the wp-config file it will re-read everything. You can also try restarting your HTTP server (Apache) just to make sure.

3- Your feeds should be working now!

Removing the Wordpress Generator

Posted in tunning, wordpress on February 21st, 2010 by fseek – Be the first to comment

Have you ever checked the source of a Wordpress blog and saw something like:

<meta name=”generator”>Wordpress 2.7</meta>

That’s the generator that Wordpress adds to all the blogs. If you don’t want everyone to know which version you are using, add the following line to your functions.php (or function.php) file inside your theme directory:

(your file should be something like this: /var/www/[yoursite]/wp-content/themes/[yourtheme]/functions.php )
<?php remove_action(‘wp_head’, ‘wp_generator’); ?>

For more tips to secure a Wordpress blog, check this page: Wordpress Hardening

Setting up your VPS – From the default install to a full Wordpress blog

Posted in guide, howto, vps, wordpress on February 13th, 2010 by fseek – 2 Comments

Easy step by step guide to setup your Linode Centos 5.3 server (via SSH without cpanel). We will show you how to install the LAMP stack (Apache, MySQL, PHP) and Wordpress.

Linode as well as most VPS (Virtual Private Servers), generally come with the minimum install of Linux by default, so to get to a full Wordpress blog running, you need a bit of work. This how-to will get you done very quickly.

First action: Update the box with a simple yum upgrade:

# yum upgrade

Say “yes” to all the questions to get everything updated before we move on.

1-Install Apache, PHP and the MySQL Server:

# yum install httpd.i386 php.i386 mysql.i386 php-mysql.i386 mysql-server.i386

After that is done, we can start Apache and configure it to start during the boot:

# chkconfig –level 3 httpd on
# /etc/init.d/httpd start
Starting httpd:                                                      [  OK  ]

You should now see Apache running with the “netstat” command:

#netstat -tanep |grep LISTEN
tcp        0      0 :::80                       :::*                        LISTEN      0          21928      3098/httpd
tcp        0      0 :::22                       :::*                        LISTEN      0          20513      3030/sshd

Very simple and easy.

2-Configure MySQL

Before we start MySQL we need to secure and tune it a little bit. MySQL comes with the “mysql_secure_installation” command to help automate this work. To get started, run:

[root@li65-185 ~]# /usr/bin/mysql_secure_installation

And say yes to all the questions:( and remember the MySQL root password since you will need it later)

Set root password? [Y/n] Y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

After that, you can start MySQL, configure it to start during boot and check if it is running with the “netstat” command:

# /etc/init.d/mysqld start
# chkconfig –level 3 mysqld on
# netstat -tanep
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       User       Inode      PID/Program name
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      27         22517      3246/mysqld

If you see the “mysqld” command on port 3306 it means you are all set to go.

3-Setting up database for Wordpress:

Once you have MySQL and Apache running, we can create the necessary tables in the database for Wordpress. These three queries are enough for it (you just need to change wpsite1 for the database name you want and wpuser/wppass for the username/password combination you prefer)

# mysql -u root -e “CREATE DATABASE wpsite1″ -p
# mysql -u root -e ‘GRANT ALL PRIVILEGES ON wpsite1.* TO “wpuser”@”localhost” IDENTIFIED BY “wppass”;’ -p
# mysql -u root -e ‘FLUSH PRIVILEGES;’ -p

Note that it will ask for your MySQL password you gave when you ran the “mysql_secure_installation” command. I hope you kept it in memory.

4- Installing Wordpress

Wordpress is very easy to install and widely documented. You just need to download it to your htdocs directory (in our case /var/www), uncompress and rename it to your site name (for this example we will use “yoursite.name”):

# cd /var/www
# wget http://wordpress.org/latest.tar.gz
# tar -zxvf latest.tar.gz
# mv wordpress yoursite.name
# cd /var/www/yoursite.name

Now, you need to rename wp-config-sample.php to wp-config.php and edit it with the
database name, user and pass you specified before:

# mv wp-config-sample.php wp-config.php
# vim wp-config.php

define(‘DB_NAME’, ‘wpfseek’);
define(‘DB_USER’, ‘wpfseeku’);
define(‘DB_PASSWORD’, ‘wpfseekp’);

Now that wordpress is done you need to configure apache to read /var/www/yoursite.name as the main root
for your site. To do that, create a file at /etc/httpd/conf.d like that (remember, always change yoursite.name for your real domain and 1.2.3.4 for your IP address):

# cat > /etc/httpd/conf.d
NameVirtualHost 1.2.3.4:80

<VirtualHost 1.2.3.4:80>
DocumentRoot “/var/www/yoursite.name”
ServerName yoursite.name
ErrorLog logs/error.log
CustomLog logs/access.log combined
<Directory “/var/www/yoursite.name”>
Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Restart Apache and now you should be able to access your site to start blogging:

/etc/init.d/httpd restart

All commands to get the server ready for MySQL:

yum install httpd.i386 php.i386 mysql.i386 php-mysql.i386 mysql-server.i386
chkconfig –level 3 httpd on
chkconfig –level 3 mysqld on
/usr/bin/mysql_secure_installation
/etc/init.d/httpd start
/etc/init.d/mysqld start