WordPress Shell Update Script

Hello everyone, today I am going to share with you a shell script I have been using to easily update my WordPress blog installation (and can easily be expanded to upgrade multiple blogs as well). The script I wrote automatically downloads the latest version of WordPress, extracts it, and updates your blog files. In order to run this script you will need SSH access and the ability to run shell scripts. This script was written to work with my host which runs on cPanel, but it can easily be altered to work on other systems as well by modify the directories. Below are instructions on how you can go about using this shell script to easily upgrade your blog.

  1. Login to SSH with your cPanel username and password
  2. Create a directory called upgrade_blog/ in your home directory (mkdir ~/upgrade_blog)
  3. Navigate to the upgrade_blog directory (cd ~/upgrade_blog)
  4. Create a new file called “run.sh” using your text editor of choice (I use nano)
  5. Paste the following code into the run.sh file:
    rm -rdf ~/upgrade_blog/latest.zip ~/upgrade_blog/wordpress/
    wget http://wordpress.org/latest.zip
    unzip latest.zip
    cp -r ~/upgrade_blog/wordpress/* ~/public_html/blog/
  6. Save the file
  7. To update your blog just simply navigate to the upgrade_blog/ directory in SSH and execute the run.sh file (sh run.sh)
  8. The script automatically downloads the latest version of WordPress and updates your blog accordingly.
  9. Once the script has finished executing open up your blog and go to your admin. WordPress will ask you to upgrade your database if it is needed.
  10. If you want to upgrade multiple blogs just copy the last line from the script and change the directory it copies the WordPress files to.
  11. Note: This script is based off of of the assumption that your blog is located in public_html/blog if your blog is located elsewhere change it.

And that’s all there is to it. Enjoy.

Posted in WordPress | Tagged , , , , , | Leave a comment

Purely CSS-Based Dropdown Menu

Here is a purely CSS-based dropdown menu that I threw together real quick for my blog. It doesn’t use any javascript and works in all major latest browsers (Not you IE6 – You need to die already :P )

If you have any issues or questions leave them in a comment below.

Please Note: This is just a simple example for you to base your own menus off of. It does not take into account browser screen width or height (to prevent opening menus off-screen) because that would require Javascript, maybe in the future I will create another post about how to make a JavaScript based dropdown menu that uses Javascript to make sure the menus don’t appear off-screen.

DownloadDemo

Posted in CSS | Tagged , | 1 Comment

PHP Random Image Script

This script takes a list of images with links and randomly outputs one of them.

<img src="\" alt="\&quot;&quot;.$img[1].&quot;\&quot;" />";
?&gt;
Posted in PHP | Tagged , , | Leave a comment

Dynamic PHP Font Generator

This is a little script I expanded upon that I found from one of my previous clients. The original script was created by Stewart Rosenberger. The WP Now website uses this script to dynamically generate testimonial signatures.
Continue reading

Posted in Featured Content, PHP | Tagged , , | 25 Comments

WP Now Launched & New Theme

Hello everyone,

Today, with two colleagues of mine, we have launched a brand new premium wordpress themes website.  Check it out at http://www.wpnow.com/.
I have also uploaded one of the WP Now themes I coded (Elements) to this blog because I really liked it :P , any comments feel free to post below!

Ryan

Posted in Coding, Design, Featured Content, Personal, Web Development | Tagged , , | 6 Comments

Opengoo – Open Source Web Office

A few months ago I came across an amazing open source web office suite called OpenGoo. It contains everything I need for managing my personal and client projects, including a task manager, calendar, contacts, web links, documents, presentations, time tracking, and more. I definitely recommend for anyone who is looking for a free and open source project management application to take a look at OpenGoo.

For more information about OpenGoo be sure to check out their website.

Posted in Software | Tagged | Leave a comment

dewPixel Update

Well, it’s been difficult but dewPixel Hosting is starting to get back to normal after the hard drive crash last week. Had a little issue today with one of iWeb’s switches that caused the server to go down for about an hour but nothing was lost (thankfully). dewPixel is accepting new customers so if anyone is in need of hosting by all means give dewPixel Hosting a visit.

Posted in Other | Tagged , | 2 Comments

Linksys WRT54GL + DD-WRT Custom Firmware

Just ordered one of these routers from Newegg.com about a week ago. The thing that’s great about this router is it actually allows you to install your own custom firmware (Such as DD-WRT) to it. In fact, the only reason I bought this particular router was for that reason alone. I now have my own personal network setup in my room that connects my laptop, home server, and desktop all together. I setup DD-WRT to connect to my main router via wireless in repeater mode, and also have it broadcasting it’s own SSID that I connect my wireless devices to. The setup I have now would not have been possible without DD-WRT and all it’s awesomeness, if you’re looking for having complete control over your router I recommend using DD-WRT with the Linksys WRT54GL router.

Posted in Hardware, Software | Tagged , , | Leave a comment

Windows 7 RC1

Today I downloaded and installed the 32-Bit Windows 7 RC1 to my Dell Studio 15 laptop. Everything is running great so far. My laptop has 3GB of RAM and windows 7 with aero on, high performance power setting, and my anti-virus and firewall (ESET) running takes up only 700 MB of system memory, that’s some great optimization. I plan on giving the 64-Bit version a try on my desktop computer to see how it runs.

Posted in Software | Tagged , , , | 4 Comments