Prevent WordPress from asking FTP details

Tags:

When installing a new plugin, or upgrading an existing theme, plugin, or WordPress itself, you may be asked for FTP details. But, you say, I thought I had this configured to update directly. Here's how to force WordPress to upgrade without FTP.

In your wp-config.php file, add a line near the top:

define('FS_METHOD', 'direct');

This forces WordPress to write to files directly. Once this is done, you will get error messages that better explain what isn't working.

For example, you may need group write privileges on the wp-content/upgrade directory:

chmod g+w wp-content/upgrade

If you get this error:

Could not remove the old plugin.

you will also need to ensure there is group write on all the plugins themselves:

chmod -R g+w wp-content/plugins

Updating Subversion in Centos 5.5

Tags:

Interacting with modern Subversion repositories requires a modern copy. Centos 5.5, and other previous versions however, have rather old copies. My server reported (typed text underlined) --

# <span style="text-decoration: underline;">rpm -qa|grep subversion</span>
subversion-1.4.2-4.el5_3.1

The first step is to disable the yum-priorities plugin, if you are using it. If it exists, edit the file /etc/yum/pluginconf.d/priorities.conf and set enabled=0 -- you may want to change it back after you are done here.

Now let's see which subversion we have installed.

<code>  $ rpm -qa|grep subversion
    subversion-1.4.2-4.el5_3.1
</code>

Ah, right. Version 1.4.2 ... We want at least 1.5.

Install the rpmforge repository, following the CentOS instructions. There are the commands I used, you will want to verify the latest version.

# <span style="text-decoration: underline;">wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm</span>
# <span style="text-decoration: underline;">rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt</span>
# <span style="text-decoration: underline;">rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm</span>
# <span style="text-decoration: underline;">rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm</span>

RPMs that overwrite base CentOS modules have been removed from the main rpmforge repository, and put into the rpmforge-extras repository. Unfortunately that is disabled by default, and it is less than obvious how to enable it. The setting is in /etc/yum.repos.d/rpmforge.repo ... Look for this stanza and change the enabled line:

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
<strong>enabled = 1</strong>
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

After this, you can just do a regular yum update or you can manually do just the one:

<pre style="padding-left: 30px;"><code>$ yum --enablerepo=rpmforge check-update subversion
subversion   </code>subversion-1.6.15-0.1.el5.rfx<code>         rpmforge
</code>

Comparing Wordpress Versions

Tags:

This morning I saw a critical update to WordPress ... and wondered what had actually changed.

When you need to compare the installed version of Wordpress (or any program, really) with a different version in the official repository, Subversion can help, although it is not exactly obvious. Here is the incantation:

svn diff --old=. --new=http://core.svn.wordpress.org/tags/3.0.4

With subversion 1.5 or later, you can use the shortcut:

svn diff --old=. --new=^/tags/3.0.4

Or to compare the current version to the new main 'trunk' --

$ svn diff --old=. --new=^/trunk

Subversion 1.6 on Debian (Lenny)

Tags:

See the instructions at http://backports.org/dokuwiki/doku.php?id=instructions

Subversion 1.6.5 on Ubuntu 9.04

Tags:

Following the instructions at:

`[

https://launchpad.net/~anders-kaseorg/+archive/subversion-1.6 ](https://launchpad.net/~anders-kaseorg/+archive/subversion-1.6)`

Edit the apt sources, using your favorite editor:

$ sudo emacs /etc/apt/sources.list

Add these lines to the end of the file:

`

deb http://ppa.launchpad.net/anders-kaseorg/subversion-1.6/ubuntu jaunty main deb-src http://ppa.launchpad.net/anders-kaseorg/subversion-1.6/ubuntu jaunty main `

The add the key signature:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 413576CB

where 413576CB is the Signing Key from the web page above... update the apt cache, and force a reinstall:

$ sudo apt-get update $ sudo apt-get --reinstall install subversion