Download packages and wordpress plugins with wget and SSH [solved]

If you’re a typical web designer, when you install web packages like phpBB or wordpress or plugins like bad behavior or spam karma, you probably go to the web page that hosts the file, download it to your computer, unzip it, FTP to your host, and upload the directory to install the package.

Well, if your host has SSH access, there’s an easier way:

Go to the webpage of the file you want to download and right click and copy the link instead of downloading it.

Get putty and connect to your host via SSH on port 22, using your FTP login and password.

cd to the directory you want to download the file to (such as cd public_html/wordpress/wp-content/plugins/).

Type in this command:

wget [URL]

Where [URL] is the link to the downloaded file. For instance:


You can right click to paste in putty, so just type wget, hit space and then right click and hit enter.
Voila! Now you’ve downloaded the package right to your host. It’s way faster too.

Wget also works great for anonymous FTP files, just paste in the URL in the same way.

After you’re done downloading, to unzip a .zip file you just type:

unzip []

To gunzip and untar a .tar.gz file you can type:

tar -xvzf [nameoffile.tar.gz]

Voila! Then follow the instructions to continue installing your package (such as logging into wordpress, clicking on plugins and activating your plugin).

Is the directory named something different than you want? Just use mv:

mv [nameofdirectory] [newnamefordirectory]

Does the unzipped directory have an unwanted subdirectory? cd into the directory/subdirectory and then move everything down a level:

cd [directory]/[unwantedsubdirectory]/

mv * ..

This is a no brainer for your typical linux guru, but a great trick for your average web developer!

Hide Administrator Email in phpBB

phpBB has a CAPTCHA image verification system on its registration page for preventing spam to your board, which is nice. To accomodate the blind and disabled who can’t read the image though, it says, “If you are visually impaired or cannot otherwise read this code please contact the Administrator for help.” But the administrator link is a plaintext mailto link to your email! Boo.

You know that if you put your email in plaintext on a website, or put a mailto link to your email on a website (or both), that spam bots will pick up your email and never let go, forever spamming you for the rest of your life, right?

Tools such as this online email obfuscator or this email cloaker apple widget turn your email into a HEX code, ASCII code, or javascript code to prevent spammers from getting your email. I’ve been using them for years and they work great.

Anyway, so how do you do this in phpBB?

I did a grep in the phpBB directory for mailto links with the following command:

grep -R “mailto” *

The culprit is the file usercp_register.php. Open this up and find this line:

‘L_CONFIRM_CODE_IMPAIRED’ => sprintf($lang[‘Confirm_code_impaired’], ‘<a href=”mailto:’ .
$board_config[‘board_email’] . ‘”>’, ‘</a>’),
Copy the whole line and paste it onto a second line. Then comment out the first line (add // at the beginning) to deactivate it. Then change the second one: Change

to your obfuscated email, the hex/ascii code that the email obfuscator gave you.

So your code should look like this:

//’L_CONFIRM_CODE_IMPAIRED’ => sprintf($lang[‘Confirm_code_impaired’], ‘<a href=”mailto:’ .
$board_config[‘board_email’] . ‘”>’, ‘</a>’),
‘L_CONFIRM_CODE_IMPAIRED’ => sprintf($lang[‘Confirm_code_impaired’], ‘<a href=”mailto:’ .
‘[your obfuscated email address]’ . ‘”>’, ‘</a>’),
(where [your obfuscated email address] is the code the email obfuscator gave you.) Save and quit and you’re done!