Archive for the ‘ WordPress ’ Category

Backing Up Your DataBase to Use XAMPP

In this post we are continuing our work with XAMPP to allow us to run a live website on our desktop or laptop.

Today we are backing up the WordPress database as well as the website files and will move them to the local desktop for use with XAMPP as a development website.

In the following video we walk through finding the MySQL database, exporting the database and coping the website files to the local desktop.

How to Format Your Website for Mobile Devices

More and more mobile devices are hitting the web.  With the advent of the iPhone and the 3G cellular network, browsing on the Internet with your cell phone is almost as fun and easy as from your laptop or p.c.

But what does this mean – should you optimize your website for mobile devices?

Here are some things you should consider about going mobile with your website:

  • How does your website look on a mobile device?
  • How do you do optimize for mobile devices easily?
  • How fast does it load on a mobile device?
  • Can your reader get to all of the information you are providing?
  • Are you loosing money from mobile readers(adsense clicks)?

This all reminds me of the browser wars back when Microsoft and Netscape were battling it out for readership with the differing browser technologies. Webmasters always had to optimize for both major browsers.  It was a pain!!

iphone-wptouchLuckily today we have WordPress and a great new plugin from Brave new Code that will make sure we don’t go back to those dreary old times.   The plugin is called WPtouch and it does an awesome job of automatically optimizing your WordPress website for mobile devices. Oh and did I mention it’s free? (donations gladly excepted of course!)

As simply and easy as a WordPress plugin can be, WPtouch allows you to install it quickly and have your website ready to go for iPhone, Blackberry and Android browsers. It is truly amazing.

It basically works on the idea of themes and installs a new theme for your website the will only show for browsers(user-agents) matching mobile devices.  Don’t get me wrong,  its more that just a theme.   It also provides a way to add google adsense, ad customize icons for your content, and you can choose to include or exclude certain content not suited for mobile users.

So far the only issue I’ve seen with the plugin is that it has a bit of trouble working with caching or caching plugins.  So website with things like WP Cache, WP Super Cache, ot W3 Total Cache may or may not allow the mobile theme to display properly.  Most of these issues can be resolved with some simply tweaks to your .htaccess file.

With this aside, WPtouch is a really cool way to easily add a unique experience for your mobile readers that will entice them to return and read more frequently.

How to Move (or Flip) Your WordPress Blog in 20 minutes

moving

Here it is!  Step by Step instructions for moving a WordPress blog to a new hosting provider.  This is extremely helpful if you ever sell a blog, buy a blog, flip a blog,  or just decide you don’t like your hosting provider and want to move all your sites to a new home!

Many thanks to Forest Parks who originally showed me the light!

  1. FTP to the site that you want to transfer.  Copy everything in the wordpress wp-content folder to your desktop.
  2. Login to your Cpanel and go to PHP My Admin.  On the left, click on the name of the database for your blog that your moving.
  3. Click on the Export tab within PHP MyAdmin.  Export the database as SQL (should be the default) I normally leave the settings as they are.  At the bottom make sure “Save as file” is checked and click Go.  Save file to your desktop
  4. Change your DNS. Login to your domain management and set the nameservers to that of the new host. With GoDaddy propogation is normally done in 3 or 5 mins.
  5. Go to your the hosting provider and set up the hosting account.  Login to cpanel and use Fantastico Deluxe to install a new version of wordpress (You can also install it manually if you need to)
  6. FTP to the new host.  Copy your wp-content from your original site and overwrite  the installed wp-content.
  7. Login to the new PHP My Admin.  Find the new wordpress database (this was created when you installed WordPress on the new site) Open the wordpress database, select all the files inside and select the drop option.  The database should now be empty.
  8. Finally, Import your saved database into the now empty database.
  9. (Optional) – Take a break – have a beer – you deserve it!

How To Find The Name of Your Database

  1. If you have trouble finding the correct name of the database that your WordPress blog is using… you can find it this way.
  2. FTP to your site.
  3. In the root directory of your web site there is a wp-config.php file.
  4. Open this file with a text editor. (be careful – editors like Windows Notepad may add hidden characters to your file) I use Notepad++ it’s free and won’t mess with your files.

Look for the following lines in your wp-config.php file

define('DB_NAME', 'myname_mydbname"');    //  <-- The name of the database
define('DB_USER', 'myname_myuser');     // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost');    // you won't need to change this

The first line shows you the database name you need to work with.

And that’s it!  Let me know if this has helped you in any way.  Also visit Forest’s website and give him some thanks too!

Control How Posts are Displayed with Custom Query String

I can’t tell you how many times I bang my head against my computer trying to make WordPress do something or display content in a way that it just doesn’t do straight out of the box.  For example, displaying the number of posts on a page.  This is an all or nothing situation.  Sure I can set this globally (meaning I can set WordPress to display 1 post per page or 5 posts per page – but this is for every page on my web site)

What if I wanted to display the top 3 news posts, or wanted to display one post on my home page and then display 10 post excerpts on the category pages?  I think you can see my point.

Well today I ran across a handy little plugin from Matt Read called Custom Query String.  This cool little plugin for WordPress now gives me the freedom I’ve been needing and allows me to better customize my web site pages for a better user experience.
custom-query-string

With Custom Query String I can easily change just about any way a post is displayed.  I can change the number of posts that are displayed on my my home page, or change my category pages, or change how the order of posts are displayed.

Installing the plugin is super easy.  It is installed like any other plugin, simply drop the custom-query-string.php file in your plugins directory and activate.

Once it is activated you will still need to create a “Condition”  and an associated “Result” .  This may look a little strange and seem a bit intimidating to beginners, but once you create your first condition it will be clear.

The easiest way I found to test this plugin is to create a condition for your home page.   First this you need to add a new condition.  In the Add New Condition section, click the drop down box under  Condition and select “is_home”.    Then in the same row add the number of post you want to show on your home page.  I left everything else default and clicked “Add”.   This allowed me to show two posts on my home page.

One thing I would love to see is the ability to edit Current Conditions.  Right now, if you want to change a Current Condition you have to delete it and re-create. Not a big deal really because creating the conditions is quick and easy,.

This is an awesome  little plug-in.  Custom Query String unlocked some needed functionality I’ve been needing in WordPress and I hope it helps you too!