Archive for category Tips and Tricks

Annoyed by WordPress asking for FTP username/password?

In WordPress version 2.7 and 2.8, you’ve probably noticed a new feature built into WordPress…FTP updates of plugins.   It’s a great new feature and does add a layer of security to the whole process.  In the past, you would have to chmod your directories to 777 for this to happen.

Now by providing FTP credentials, you can automatically update your plugins safely and securely.  And there are those that worry about the security of storing your FTP password in the config files.  Well the fact is your database password is already stored in that same file.  In addition, if you think about it, if you had to type your username/password each time into your web-browser, that info is being sent over the net already anyways.

Besides, the FTP method is much more secure on shared servers than using chmod 777 on everything in sight.  FTP updates/updating seems to be the way of the future as opposed to using chmod 777, apps like Joomla have already adopted this method.

There is one catch though, if you don’t have passwords and forms saved in your browser, WordPress will ask you for your FTP login credentials every time.  If you manage alot of WordPress sites, this can get annoying very quickly.

Thankfully, there’s a simple solution which will save the FTP login (username/password/server) so WordPress stops asking you for them.  Here’s how you do it.

1.  Locate your WordPress root diectory and find the “wp-config.php” file.

2.  Edit the file and insert this somewhere in the middle as it’s own block, we normally put it after the mysql username/password block.

/*** FTP login settings ***/
define("FTP_HOST", "localhost");
define("FTP_USER", "yourftpusername");
define("FTP_PASS", "yourftppassword");
Of course you'll want to change "yourftpusername" and "yourftppassword" to the actual FTP usernames/passwords for your site.

Once you’ve made that edit, save the file and voila!  No more punching in your ftp username and password all the time.

Tags: ,

Socket F heatsink and fan same as Socket 940?

We’ve been buying the Opteron Quad Core Barcelona 8350′s for quite some time now…they are the foundation for our 32 CPU Core Servers.  These are the AMD 2nd Generation Opteron chips and are based on Socket F (aka Socket 1207).  We recently got in a bunch of Opteron 8350′s in an OEM bulk package without Heatsinks and fans.

We were about to go and purchase specific Socket F/1207 heatsinks and fans when we noticed the AMD Opteron 1st Generation Socket 940 Opteron heatsink mounting patterns looked extremely similar.

We did some precise measurements on the heatsink/backplates and lo and behold, the mounting pitches are exactly identical at “3.5″.   The other consideration is the thermal envelope of the new chips versus the old socket 940 chips and that isn’t an issue.    Socket F also came out with a 4.1″ mounting pitch (which is NOT compatible with Socket 940 heatsinks) but it is pretty rare…only motherboard we know of that uses the odd 4.1″ mounting pitch is the Tyan S2912G2NR.

So, YES, you can use most of the Socket 940 CPU’s with the newer Opteron Socket F/Socket 1207 as their mounting, thermal envelope and pitch are virtually identical.  Just make sure you use a high quality fan, as this is usually the PC component that breaks down first.

By re-using these high quality copper heatsinks instead of throwing them out, we’ll be recycling a ton of copper!

Why is my .htaccess not working?

If you have a VPS or Linux server running Apache the goold old fashioned way without fancy control panels, you’ll quickly have to learn some Apache tweaks.

One of the main issues we commonly run into is a non-working .htaccess file.  Apache doesn’t come with .htaccess support automatically turned on.  You’ll have to turn it on in order for .htaccess files to have an effect.  Here’s what you do:

There are two ways,

  1. Edit your httpd.conf manually using a text editor like vim, nano, vi, joe whatever you like.
  2. Edit your httpd.conf through Webmin

Since the Webmin version is more graphical, we’ll show you how to do it through Webmin.  If you’re using a text editor, just skip to the portion with the AllowOveride command.

  1. Login to your Webmin
  2. Servers>Apache
  3. Go to the Global Configuration tab
  4. Click on EDIT CONFIG FILES
  5. Search for AllowOveride and .htaccess and remove the # sign in front or type “AllowOveride All”.

This should fix it permanently and allow your .htaccess files to override pretty much and directive needed.

Tags: , , , ,

How to install YUM manually on RedHat/RHEL 4.x or Centos 4.x

Invariably, you may find yourself with a missing YUM install or a corrupted installation and need to re-install yum to fix this problem.

Yum of course is used to easily install RPM packages like PHP or Apache or pretty much anything.  It’s equivalent would be “apt-get” on Debian based Linux systems.

So here’s how you would install YUM from scratch:
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-2.6.16-10.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/libxml2-python-2.6.16-10.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-5.el4.centos.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/sqlite-3.3.6-2.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.1.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/rpm-python-4.3.3-22_nonptl.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/i386/CentOS/RPMS/yum-metadata-parser-1.0-8.el4.centos.i386.rpm
rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.centos.org/4.6/os/x86_64/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm

Just copy and paste the above RPM code into your SSH session.

Tags: , , ,

Performance Optimization WordPress Plugins by W3 EDGE