How To: Moving WordPress to Another Server

Yesterday I wrote a post explaining how to move your WordPress install within your website/server.  Today I wanted to cover how to move your WordPress install to a completely different server.

Again, the flexibility of WordPress shines, making this not overly difficult to accomplish.  If you aren’t changing your domain name, all you need to do is update your wp-config.php file and upload all of your files to their new server.

If you are changing your domain name with your move, here is the information you’ll need:

  1. Backup your WordPress database.
  2. Download the complete WordPress install to your hard drive and identify the folder as your OLD installation.
  3. Login into your old blogs dashboard and update the Settings to reflect the website and blogs new location (both fields should be the same).
  4. Now, download the complete WordPress install to your hard drive, but this time identify the folder as your NEW installation.  This will include the settings change you just made.
  5. Download a copy of your WordPress database (keeping the old one) and then upload it to the new server.  You’ll want to keep the same database name and recreate the user login information (you can use your same user name and password).  If you change the database name, you’ll need to update your wp-config.php file to reflect the change.
  6. Upload your NEW installation folder so that your blog is now working in its new location!

If you want to keep your old blog, you’ll need to upload the OLD folder to the OLD location of your blog and readjust the General Settings tab.

Another way to accomplish all of this is to simply make a fresh WordPress install and export/import your posts to the new location.   This isn’t the most ideal method, but it is much easier and will get the job done.

For additional information, you’ll want to consult the WordPress Codex.

  • Leave a Comment
  • How To: Skip Advertisements on Single Posts

    Comments Off

    If you look around at a large sampling of WordPress blogs, chances are you’ll find a majority of them monetize their blog in some form using Google AdSense.   Even this blog adds a single AdSense block to the top-right corner of our homepage and posts that are at least 3 days old.

    If you employ an AdSense strategy like this, it is more than likely that at some point you will have certain posts that you don’t want to display advertisements on.  This could be for a number of reasons, including posts where you have a sales strategy and don’t want readers clicking off the page for any reason other than by using your product/affiliate link.

    If you’d like to prevent AdSense or other ads from showing up on certain post ID’s, our friend Keith has posted over at Weblog Tools Collection an easy to follow guide on how to skip advertisements on single posts of your choice.  You just need to know the post ID’s and add a small PHP snippet around the advertisement code.

    If you prefer not to get your hands dirty by messing with the code, you can try the Who Sees Ads WordPress plugin.

  • Leave a Comment
  • WordPress Plugin: Manage Your 125×125 Ads with Show125

    Like many other bloggers, I display 125*125 pixels ads on my blog, and earn some money with it. Currently, I own 6 different ads, and most of them change every week. I became bored of editing my sidebar template everyday, so I asked my friend X-OR to write a cool widget to manage thoses ads. Let’s review it together.

    What the Show125 widget can do for your blog

    I always loved the concept of widgets: drap n’ drop, easy to edit, easy to place, easy to remove. Most of todays themes can handle widgets, so there’s many chances that the theme you use haven’t any problem with it.

    In addition to the basic widgets advantages, Show125 gives you many option and a true control over your ads. Let’s see:

    • Display from 1 to 8 ads
    • Available in English (default) or French
    • Display all your ads together, or in an eye-candy Mootools slideshow
    • Optionally add the target=”_blank” attribute to links, if you want ads to open in a new tab.
    • Show (or not) a title for your ads block
    • Easy to install
    • Clean code
    • Add custom css class to links for styling it your way
    • And more!

    Installation

    Nothing hard here: First, download the widget. If you want to see a “live demo”, just have a look at x-or’s blog, where you’ll be able to see the slideshow mode of the widget.

    Once you unzipped the widget to your hard drive, upload the entire directory to your wp-content/plugins directory. Then, go to your WordPress administration panel and activate the plugin.

    In Design » Widgets, you’ll be able to drag n drop the Show125 widget to your sidebar (or any other widgetized part of your WP theme) and set the options.

    Once you filled the fields and saved your changes, you’ll see your ads in your sidebar. Managing your ads with Show125 really makes money earning easier!

  • Leave a Comment
  • Gravatar Checkup: Have You Created Your Gravatar?

    Wow, it seems like it was just recently, but a quick search through our archives shows that it has already been four full months since I began my campaign to get people to support Gravatars on their WordPress blogs.

    That post was originally written shortly after Automattic acquired Gravatar and most WordPress bloggers were still using the MyAvatars plugin (which displays MyBlogLog avatars).   I always enjoyed the MyAvatars plugin, but felt that it was important to show your support for WordPress by displaying Gravatars.   That was about the time that this blog switched to Gravatars and hasn’t looked back (we’ve even gone as far as to integrate them into the recent comments in the sidebar).

    In the last six months since Automattic acquired Gravatar, it has already come a long way.  Gravatars load a lot faster now and people using the WordPress 2.5 branch (or using WordPress.com) now have built-in Gravatar support.   In other words, there has never been a better time to have a Gravatar and place Gravatars on your WordPress blog.

    Sadly, a quick glance at the Recent Comments section in our sidebar often shows a number of comments left by people without a Gravatar.  If this sounds like it might be you, I recommend you register your free Gravatar account.  It is really quick and easy!

    I maintain a few Gravatar accounts (one for each website email address) so no matter what email address I use in my comment, an appropriate Gravatar should appear next to my comment.   If you have several websites, you may want to consider setting up a few accounts so you are covered in any situation.

  • Leave a Comment
  • Plugin: Turn Your WordPress Blog Into An Online Shop With WP-eCommerce

    I’m always surprised by the incredible extensibility of WordPress. We already knew that you can use WordPress as an online magazine, as a photoblog, or even as a Twitter platform. Now, it’s also possible to use your favorite blogging platform as an online shop, just by the use of a single WordPress plugin, WP-eCommerce.

    Installing WP-eCommerce

    Nothing hard: Just download the WP-eCommerce plugin here, extract the archive on your hard drive, and upload the wp-shopping-cart directory into the wp-content/plugins directory of your WordPress install.
    After activating the plugin, you’ll see a new tab named e-Commerce next to the Comments tab in your WordPress control panel. This tab contains all options needed for running an e-commerce website, right into WordPress.

    I must admit it, i was surprised – in a good way – by the number of available options: language, localization, tax rates, brands, products, paypal integration, and so on. Sure, this is not Amazon.com, but everything is here to create an online shop which will give satisfaction up to 90% of online sellers. You can easily manage products, payment methods…There’s also a sales journal available, which will help you a lot to manage orders.

    User Experience

    In addition to its powerful management panel, WP-eCommerce comes with no less than 6 widgets in order to make your clients purchases simpler, and more pleasant. I particularly loved the “Shopping Cart” widget and its ajax interface. Clean, easy, and pro, definitely. Some other available widgets: Categories & brands, Special products, donations…

    Conclusion

    I was really impressed by this plugin. WP-eCommerce has absolutely everything you need for starting an online shop. There’s also a non-free version of this plugin, which will give you, in addition to the “basic” plugin, a search engine for your products, a picture gallery and some others nice things.

  • Leave a Comment
  • How Can You Contribute to WordPress?

    Open source is a wonderful thing.   Probably my favorite part about it is that everyone who uses open source software can find ways to help improve it.   So, what can you do to help WordPress grow?  Weblog Tools Collection did a great job recently when they tackled this exact question in their post 24 Ways to Contribute to WordPress.

    The first three things that come to mind when I think of contributing to WordPress are creating WordPress themes, creating WordPress plugins, or creating a WordPress blog to help the community.   If you’d like to see the other 21, click over to check out the list.

  • Leave a Comment
  • How To: Finding a WordPress Job

    If you consider yourself a WordPress freelancer or at least have good enough hacking skills to do some paid work with WordPress, you may be wondering what the best ways are to find work?  

    Over at the Planet Ozh blog, Ozh recently gave some great tips on how to find WordPress work.   The first tip?  Subscribe to the WP-Pro mailing list, where job offers are regularly available.   These jobs can range from theme design, coding help, or even basics like installing WordPress. 

    Other places he mentions to look:

    Your other option is of course to do some work up front and then charge for it, which is how premium theme authors and premium plugin authors make their money.   This way people come to you and they know what they are getting ahead of time. 

    Any other good places to find WordPress work?

  • Leave a Comment
  • WordPress is More Than Just Blogging Software

    If you take a step back and look at the successful premium WordPress themes available today, the first thing you’ll notice is that they offer much more than the standard blogging template that most free WordPress themes offer.  You’ll find magazine themes, news themes, video themes, social networking themes, and all sorts of other themes that are designed to function as content management systems.

    In looking at the future of WordPress, my hope is that the standard build of WordPress will continue to grow and many WordPress plugins will fill the gaps to make a fully functional content management system.

    Recently BloggingPro did a great job of showing the versatility of WordPress with their post showing 7 different ways to use WordPress.  In their post, they highlight these 7 ways you can use WordPress:

    1. Blogging
    2. Photoblog
    3. Tumblelog
    4. Magazine
    5. Online Shop
    6. Contact Manager and Customer Relations Management
    7. Twitter Platform

    Click over to see the examples of each!

    I personally use WordPress for most of my content sites, including several static sites, a tumblelog, and of course several blogs.   Its versatility is amazing. In what unique ways have you used WordPress?

  • Leave a Comment
  • Is Your WordPress Site Hackable?

    This guest post was written by Hayes Potter, who is a 13 year old programmer and web developer that gives webmasters tips on protecting their website from common hacking techniques. If you have webmaster or WordPress knowledge and are interested in writing a post for Hack WordPress, please contact us.

    Today I want to ask all the web masters out there “Is your site hackable?”. I’m a test hacker, and I’ve seen some very popular sites get hacked in some of the simplest ways. Hacking wordpress is actually quite easy if you know what your doing. Two words my friend, “SQL Injections”, most people bypass this thought when they make a blog. Even know wordpress login forms prevent SQL Injections but what about form making plugins? Always check to see if your site is hackable through SQL Injections, for more information on simple hacking with SQL Injection visit my post about it by clicking here.

    Also if you have a “robots.txt” file in your home directory, keep in mind that disallowing search engines doesn’t disallow people! Never leave directories with password’s in them, even if it is encrypted. If you have to password protect the director and/or password file. Also always keep your cgi-bin password protected because a lot of file management systems use it to keep passwords that you use. I know some cPanel file management systems do. So always check your site for rogue password files and SQL Injection prevention.

    Editor’s Note: If you aren’t very familiar with some of this terminology, your best bet is to always keep your WordPress blogs upgraded to the latest version of WordPress.

    Learning More About Javascript Injections

    Ok, for those of you who don’t know what javascript injections are, they are ways to manipulate the page source of any web page. Some very simple javascript injections are to simply display an alert box with any text you want. To execute any form of javascript injection enter “javascript:” in the URL bar in your browser, then after the colon you can enter any javascript code in the same way you would in a normal web page. For example if you type in “javascript:var a = “hello world!”; alert(a)” in the URL bar an alert box would pop-up displaying the value of the variable “a”.

    Now that you know the basics to javascript injections lets learn how to hack with them, as you should know javascript can manipulate anything on a web page. Here is a simple way to hack into a username on a website. Although the site you try to hack you have to be logged into that site. Once logged in type in the following javascript injection in the URL bar: “javascript:alert(document.cookie)”. This will display the cookie information that the site has on you, look for something like “user_id=xxx” or “PHPSESSID=xxx”. Typically you want to change this string’s value to 1, because the administrator is usually user_id number 1. To change it type in the following in the URL bar: “javascript:void(document.cookie user_id=1);alert(document.cookie);”. Now the user_id’s value should be 1, so refresh the page and you should be logged in as the administrator.

    Please remember that you should never mess around with someones site. Always contact the administrator if you find a security hole in their site. Now remember how I said javascript can manipulate anything on a webpage? Well lets start manipulating stuff, for the basics we can just start with forms. Lets say a web page has a form to buy something using a debit card or something like that. Lets say the price for this item is fifty dollars, now lets manipulate this price. Lets say the submit button is a form itself, and it has no other values. In the URL bar type the following: “javascript:void(document.forms[0] = $1.00)”. Ultimately this will change price to one dollar, yes! The “[0]” represents the form number on the page, for example if there are 3 forms on a page. The first one would be labeled “0” the second one “1” and the third one “2”.

  • Leave a Comment
  • Collection of WordPress Resources

    As I mentioned in a post written last month, I wanted to collect everyones WordPress resources so I could throw together a WordPress resources page. After all, WordPress is community-based and it seemed like a good way to support WordPress users. I am proud to say that I was able to combine my favorite WordPress sites with yours to create a WordPress resources page here at Hack WordPress, which I hope people will find useful.

    If you are wondering why a couple sites are left off the list, it is probably for one of two reasons. The first is that I don’t know about it and the second is because I had to leave off (for the most part) any submitted blogs that occasionally write about WordPress (such as a category or whatever). This is because the collection of WordPress resources is already very large and these types of lists can get out of hand if you don’t draw the line somewhere.

    As with my WordPress theme galleries and other lists I maintain here, my ultimate goal is to keep this page useful. As a result, I will make every attempt to keep this page updated over time. You can help by letting us know if you find any invalid links or you would like to see something added.

    As for the list itself, here is what I’ve collected so far:

    WordPress Blogs WordPress Themes
  • Leave a Comment