显示标签为“wordpress”的博文。显示所有博文
显示标签为“wordpress”的博文。显示所有博文

2012年4月7日星期六

VaultPress Gets One-Click WordPress Database Restore

Vaultpress finally got the much desired one-click database restore feature for WordPress blogs. Vaultpress is a popular service by Automattic, makers of WordPress, which provides streamlined wordpress database backup, security and support.


vaultpress


Read our VaultPress review. We have been using Vaultpress for many months now as it quietly syncs our site database, themes, uploaded images and plugins in the background in real time providing a ready updated complete backup when needed.


VaultPress WordPress Database Restore


Previously you needed to download the files and restore them yourself, but the new feature of 1-click database restore makes it worth the money.


Vaultpress database restore


database backup


restore database confirm


There are many WordPress backup services, but we chose Vaultpress, and the $15 per month spent on this service is worth the money should the database just crash one day. All plans include Realtime Backups, Downloadable Archives for Restoring, Vitality Statistics, and the Activity Log. Our Basic plan provides access to disaster recovery and support services also. More expensive plans also include  site migration assistance, automated security scanning, security consulting and performance auditing.


See the video how database recovery works


Previously we used to keep daily database backups, but now we add Vaultpress to the daily cpanel backup and full VPS backups by our amazing webhosting service Knownhost - it all helps to secure backup copies of the whole site for easy restoration (Remember when our site was hacked!). I am sure many more people will find Vaultpress useful now.





Related articles you might like ...

How to Force Browsers to Refresh CSS for Your WordPress Blog

How can you force your reader’s browser to refresh CSS files when you change CSS stylesheets in WordPress blogs? Unless you force CSS refresh, the regular visitors browser continues to load the old cached CSS files and new changes to the CSS on your site are never visible till the user decided to refresh the page, wherein the browser clears the CSS from the cache and loads a fresh current CSS file.


If you made minor changes, old cached CSS files might not make a difference. But what it you made substantial structural changes, or introduced new classes… your site would appear totally broken to regular visitors.  How many readers would think that refreshing the page will fix your site?


css stylesheet


Force CSS Files Refresh


The answer is to force browsers to load the latest CSS file.


1. The way to do this is to change to a new CSS file name in the HEAD of the html, that will force the browser to load a new stylesheet file. But if you edit your CSS too frequently, its cumbersome to keep fixing new CSS files everytime and editing the source stylesheet name everytime.


I used to keep 3 CSS files like style1.css, style2.css, style3.css and keep cut pasting the latest code edits to the new one and updating the header.php file. An easier way is to add a so called version to your CSS file everytime like ?v=25122011, this will change the file name and force a refresh, but then again you have to change the file name everytime you edit WordPress stylesheets.


2. Then I came upon this nice trick suggested by WordPress developer Mark Jaquith, which suggests you use the function filetime which adds the server time the file was changed to the CSS url. Here is the code – cut and paste and try for yourself.


<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen, projection" />


So we used this code and now our stylesheet call code in the HEAD looks like this
<link rel="stylesheet" href="http://www.quickonlinetips.com/archives/wp-content/themes/qot/style.css?1324491378" type="text/css" media="screen, projection" />


You note that the new code has made our stylesheet style.css?1324491378 – This number will change whenever we save a new version of the style.css and will force site visitors to load the fresh copy of the CSS file.


A smart trick which makes web designing easy for bloggers who like to tweak their site design every day…





Related articles you might like ...

How to Optimize WordPress Database Easily

What is the best and easiest way to optimize WordPress database? It is a good idea to optimize your WordPress database tables as useless data “Overhead” piles up over the years and slows your database down.


Our WordPress admin was getting really slow and so were the increasing  number of resource alerts. Like most WordPress bloggers, we too were always hesitant to meddle with the database fearing irreversible loss of data. There are many powerful WordPress database plugins, but they all seem too powerful and capable of modifying so much data, that it seemed better in expert hands. So we were looking for something very simple, easy and trustworthy.


Optimize WordPress Database


The we found the amazing Optimize DB plugin by Yoast, who is a well known creator of some other amazing plugins too. We simply installed and activated the plugin and it automatically analyzed how much database overheads it could save instantly. Then we backed up the database, though Vaultpress saves our latest database files automatically.


This what a partial screenshot of what we got. The plugin was going to optimize our WordPress database and save it by 33%!


optimize database


Well there is only one button to click, and we clicked it. And in the next few seconds, it was all done.


WordPress Database tables optimized


The WordPress admin speed seems better, site resource alerts seem lower too.


Warning: Always back up your full database before attempting any database changes. This seems standard disclaimer, but is very essential to restore your database if something goes wrong (and sometimes things do go wrong).





Related articles you might like ...

Find Your WordPress PHP, MySQL Versions Now

WordPress Bloggers must find the PHP version and MySQL version of their hosting server now.  The WordPress minimum requirements have changed and if your hosting server PHP and MySQL version is outdated, upon upgrade to WordPress 3.2, your site may not work.


PHP, MySQL Versions in WordPress


The minimum requirements for WordPress 3.1 (current version) are PHP 4.3 and MySQL 4.1.2. But the The minimum requirements for WordPress 3.2 (which is coming very soon) is PHP 5.2.4 and MySQL 5.0. So though most web hosting services would have updated their server, you need to be sure and not get stuck during update.


The easiest way is to install the Health Check Plugin – Its a simple WordPress plugin which will check checks PHP and MySQL versions of your server and compare them with WordPress 3.2 requirements.


We installed it and got an this response.


php mysql check


The response suggests excellent –  we are running on PHP 5.2.16 which better than required 5.2.4.


I suggest you also check your PHP and MySQL version and contact your webhosting if your server falls short. Of course, if your hosting provider cannot upgrade your PHP and MySQL, its time to find a new web hosting for your WordPress blog.





Related articles you might like ...

bbPress WordPress Plugin Installs Forum in One Click

The first integration of bbPress forums as a WordPress plugin enables bloggers to add forums in one click to increase reader engagement to their site.


bbPress forumsYou read our 10 best reasons to install bbPress and for long time bbPress has been one of the best free forum softwares out there, and now it is also the easiest forum software you could ever integrate with WordPress. Right now the latest bbPress 2.0 beta in active development and you should try it on a test wordpress installation. Download bbPress WordPress Plugin (in beta testing) to see the new features.


bbPress WordPress integration


bbPress


The new version will allow seamless integration with your WordPress site and theme, allowing integrated admin interface for forums, topics, and replies, splitting and merging topics within a single forum. Shortcodes will help you customize where your forums appear and there is the integrated child theme of TwentyTen for starters.


The power of WordPress will let you keep track of changes with topic and reply revisions, mark topics as favorites, receive emails when new replies are posted to topics you subscribe to, get forum widgets in sidebars and anonymous posting lets you open your community.


It will work with WordPress hooks, and Multisite application means that you can host unlimited bbPress forums. The important thing is there are no additional database tables and it promises to work in sync with BuddyPress Forums and WP caching plugins.


Something great is happening … I know a lot of bbPress forum owners are looking for the importer to migrate all their forums to the new WordPress integrated platform … and the time will come soon. I tried the beta and it is still buggy as of now, but I am sure the amazing WordPress community will make it better soon, and them all WordPress bloggers can get a one click forum of their own. Meanwhile there are many other WordPress Forum Plugins you can also try.





Related articles you might like ...

How to Change WordPress Login Screen Logo

Do you want to change the WordPress Login screen logo to your own site logo for better branding? Its easy to change the WordPress logo to your logo and will give better branding, especially if you have multiple authors, or require commentors to sign in repeatedly from that page.


Change WordPress Login Logo


1. Modify your logo size to create a new image with following parameters



  • .GIF image

  • Transparent background

  • Size – 310px wide, 70px height

  • Name - logo-login.gif


2. Check your WordPress login screen which would be located on the url http://yoursite.com/wp-admin/ or if you host your WordPress in a folder, then it is at http://yoursite.com/folder/wp-admin/


wordpress login screen


3. Now login via FTP on your server and browse to the wp-admin/images folder


4. Find logo-login.gif image and back it up (rename to logo-login-back.gif or download it)


5. Upload your own logo image logo-login.gif to replace it


6. Check your WordPress login screen and your logo is live


wordpress login screen new logo


if you require people to login to your site, you must change your WordPress login screen logo to bet better brand value.





Related articles you might like ...

Full Screen Distraction Free Writing in WordPress

The latest WordPress version has got full screen distraction free writing!  Finally you can write without any distraction from WordPress menu bars, browser toolbars and concentrate only on writing articles. I played with the new upcoming feature in WP 3.2 beta version and it is truly amazing.


Here is what my cluttered WP test screen looks like …


cluttered wordpress


WordPress Full Screen Writing


A new Full screen toggle button appears in the post screen.


wordpress full screen button


Click the full screen toggle button and the full screen mode goes live instantly with a few essential formatting buttons, save and exit links.


full screen wordpress


And as you start typing, whatever of the minimal WordPress menu is left … also magically disappears slowly (and comes back when you stop typing).


no distraction in wordpress writing


I am sure a lot of jouranlists, writers and bloggers will find this distraction free writing feature very useful. You can also learn how to test WordPress nightly builds and write in full screen right now.





Related articles you might like ...

Best WordPress SEO Advice I Got in 30 Minutes [Video]

I spent 30 minutes and got the best WordPress SEO advice in a long time. Watch Jim Marks from Virtual Results present his rich SEO experiences at the Wordcamp Phoenix 2011.


Watch this video and I am sure you will get some useful WordPress SEO advice as he gives tips for Beginners SEO, Intermediate SEO and advanced SEO. It is well worth spending the 30 minutes to learn SEO. I got some good tips too.



Freshly uploaded on WordPress TV.





Related articles you might like ...

How to Install WordPress Alpha, Beta Versions, Nightly Builds

How can you install and test Alpha, Beta, Nightly builds and versions of WordPress? Since the WordPress auto-upgrade feature only lets you upgrade to the latest public release, this seemed to be a tiresome manual FTP task everytime.


WordPress testers, developers and enthusiasts in general are always curious to test new upcoming features in WordPress, and this is also of use to WordPress as it taps a wider user base to detect bugs and security holes in upcoming WordPress versions.


NOTE: First it is recommended you install these versions on a test blog and NOT on your main blog, as some of these build may be unstable and can bring down your site. Also note that in upgrades involving database upgrades, you might be unable to downgrade to a previous version. Remember to keep database backups so that you can restore it if something goes wrong.


Install WordPress Alpha, Beta, Nightly Builds


First install WordPress Beta Tester plugin. It will let you upgrade your blog to the latest Beta or Release candidate easily in one click. By default it switches your blog onto the point release development track, with an option to choose bleeding updates.


In WP admin, go to Tools > Beta Testing > Choose Point release nightlies OR Bleeding edge nightlies


wordpress nightly builds


So lets say the current version right now is WP 3.1.2, and you want to upgrade and test WordPress 3.2 beta1 already released. I expected that Point release to do the trick. But as I tried, it offered to upgrade to a WP 3.1.2 alpha version!


I was surprised about this, but the plugin developer Peter Westwood points out “(Bleeding nightly) is equivalent to the beta at the moment. Once you install the beta (or any other development version of WordPress) you will be encouraged to keep up to date with the nightly builds so you benefit from fixes made.”


So choose Bleeding edge nightly builds instead. I got instantly updated to “development version (3.2-beta1-17916)” and can now keep on upgrading to get latest updates….


wordpress upgrade nightly build





Related articles you might like ...

5 Best Dropbox WordPress Plugins

What are best Dropbox WordPress plugins to integrate Dropbox storage with your WordPress blog. Dropbox provides unique functionality which can be integrated very well into WordPress.


Dropbox WordPress Plugins


Dropbox WordPress1. Dropbox CDN – Use your Dropbox ‘Public’ folder as a free Content Delivery Network (or CDN). Allows you to upload your themes CSS, JavaScript, and Images into your Dropbox ‘Public’ folder and server these files from the Dropbox network, reducing the bandwidth of your server and allowing users to load your site faster.


2. WordPress Backup to Dropbox – Automatically creates a backup your blog and uploads it to Dropbox. Just choose when and how often to backup, and a zipped archive of your website files and database is uploaded to Dropbox! Other settings include the ability to set where you want your backups stored within Dropbox and on your server, whether you want to keep a copy of the backup on your server, and how many backups you wish to hold onto at any one time.


3. Dropbox Sync – Will allow you to sync all your images from your blog posts to Dropbox. All images will load from Dropbox decreasing bandwidth and increase loading times. It’s a great way to backup all your files too!


4. Pressbox – Integrates DropBox with your blog allowing you to post images and files directly from your DropBox. Requires PHP 5.2 and cURL. Adds a new tab to the Media Upload screen to insert images and files from Dropbox into your posts. The plugin also provides a shortcode to add links or display images anywhere on your blog.


5. Dropbox Upload Form – Will insert an upload form on your WordPress blog for visitors to upload files to a Dropbox account.


Note that many of these plugins seem to be under active development and the authors ask for feedback to make them better. Dropbox is one of the best productivity softwares out there which takes your files to the cloud and let you sync between multiple computers, laptops and smartphones. Now sync the power of WordPress with Dropbox.





Related articles you might like ...

Download Google Webmasters Site Verification WordPress Plugin

Download and install the official Google Webmasters Site Verification WordPress Plugin, which makes it the easiest way to verify your WordPress.org self hosted blogs to Google Webmasters tools.


All sites added to the Google webmaster tools have to  be verified to make sure you have access and can confirm it is your site. This opens a whole lot of statistics and Google insider information about your site which is very valuable information for webmasters and site owners.


Until now the site verification options were – meta tags, links to Google Analytics or upload an html file to your server or as recommended add a DNS record to your domain name configuration.


verify site ownership


Now download the official Google Webmasters Site Verification WordPress Plugin and get the job done in minutes. This plugin needs WordPress 3.0 (or higher), PHP 5.2.0 (or higher), the JSON PHP extensions, and the CURL PHP extensions or it won’t activate.


Once activated, in the left sidebar of WP admin, click “Start Verification”, Follow authentication prompts and click “Grant access” when you are prompted to give your blog access to the Google Site Verification API. Its done. Google wants more webmasters to get verified and use the power of the webmaster tools they offer to help them improve their Google search engine results.





Related articles you might like ...

Join WordPress Theme Review Team

Join WordPress Theme Review Team and review free WordPress Themes in the official WordPress themes directory. WordPress offers a unique opportunity for thousands of WordPress theme designers to share their WordPress designs with the WordPress community.


Everyday thousands of free WordPress themes are downloaded and now you can help them review these themes. Justin Tadlock invites new theme reviewers, to give back to the community and become a better WordPress theme developer in the process. They also encourage major theme companies and big-time theme developers to join in.


WordPress Theme Review Team


This will give you insights of how mailing lists, Trac, and other systems work and help you understand theme guidelines. Right now there are 12 theme reviewers busy with the job and they want more.


Initially you will need to attach your Theme review notes, and approval status, after which a Theme Reviewer will review your comments, and resolve/close the ticket. If you get really good at it, you can be promoted to the “Reviewers” group, and assign and close tickets yourself!


We also design wordpress themes, and have updated theme versions in review for some time, and they now take longer than earlier. I understand they must be getting a lot of  theme submissions and updates everyday, and if volunteers do the job, then they must really be overworked. Over the years, WordPress theme directory has put in some excellent automated theme checks and enhanced trac functionality.


I did not know it was possible for WordPress designers to join the review team, and this presents a unique opportunity. Here are the instructions on How to Join WordPress Theme review Team. We also plan to join in soon.





Related articles you might like ...

Fix Duplicate Content: Remove WordPress replytocom Urls from Google

Remove ?replytocom Urls from Google. How to prevent ?replytocom Urls from being indexed by search engines and prevent duplicate content.


Remove ?replytocom Urls


Where do these ?replytocom parameter urls come from? These replytocom urls are created in WordPress blogs which have enabled reply to comments. If you hover over the Reply link below comments, the urls will show in the browser status bar.


I was not aware of this issue till Google Webmaster tools recently pointed duplicate title tags on pages. I have activated Canonical urls on each page, so I thought this should not be an issue, but here is what I saw.


Duplicate page titles


Why was Google indexing these replytocom urls? Upon looking around a little deeper under Site Configuration>Settings>Parameter Handling -  I found that Google Webmasters was tracking parameter handling which we had not observed earlier.


replytocom let google decide


Google was handling the replytocom parameter with the setting “Let Google decide” and obviously Google was deciding to index the links. Since Google themselves advise on the page that “Asking Google to ignore these parameters can reduce duplicate content in Google’s index and make the site more crawlable”, the best idea is to Click the Edit link beside this – and set the option to Ignore.


replytocom ignore urls


But what is strange is why was Google not indexing the canonical url in the page and indexing these parameters – wasn’t it the purpose of canonical urls to serve as a guide to the best single url. Now there are several other parameters there which you might decide to ignore and reduce duplicate content on your site.


Another way would be to add the following rule to your robots.txt file


Disallow: *?replytocom


And then there is the Replytocom redirector plugin that deals with bots that do not know how to handle the replytocom parameter as part of a wordpress url – it simply redirects such bots to the correct url, saving CPU  and network resources.


How do you handle WordPress replytocom urls?





Related articles you might like ...

Fix WordPress Error: Briefly Unavailable for Scheduled Maintenance

“Briefly Unavailable for Scheduled Maintenance. Check back in a minute.” This WordPress error got highlighted on all blog pages and WordPress admin as the site became unaccessible when I performed an automatic upgrade to WordPress to 3.1.1 right now.


Briefly Unavailable for Scheduled Maintenance


As the WordPress upgrade started, the core update was not completed and the upgrade screen got stuck. The entire site hosted the same text “Briefly Unavailable for Scheduled Maintenance. Check back in a minute.”. There was no way to access the site or WordPress Admin.


It was scary since I had recently fixed my automatic plugin upgrade errors, by switching to SuPHP. But I had encountered this once before, so I know this was not as serious as it appeared to be. But unless you know the solution, there is no way out.


When WordPress autoupgrades, it inserts a .maintenance file in the WordPress root directory, which displays the message, so people dont see the broken php codes as the site continues to upgrade. Once the WordPress core and database is upgraded, the .maintenance file is deleted and the site comes back online normally. This was an incorporation of WordPress Maintenance mode plugin into the WordPress core.


In some cases, the process gets stuck, and the .maintenence file fails to get deleted. So the same message “Briefly Unavailable for Scheduled Maintenance. Check back in a minute.” keeps displaying.


Delete .Maintenance WordPress File


FTP into your server and login to the WordPress root installation.


maintainence-error


Delete the .maintenance file. And your site will come back online. In our case it was stuck pending a database upgrade. As soon as we tried to login to WP Admin, it asked for a database upgrade which completed in one click.





Related articles you might like ...

How to Automatically Empty WordPress Trash Daily

Do you wish to delete and empty WordPress Trash daily? We delete many spam WordPress comments everyday and WordPress Trash fills up really fast. Often the Trash accumulates thousands of comments. How to empty Trash automatically?


Empty wordpress thrash


Does WordPress empty Trash ever? WordPress will permanently delete posts, pages or comments in the trash after 30 days automatically. So dont worry about accumulating thousands of Trash files.


How to empty WordPress Trash Daily


You can decide when to empty the WordPress trash by adding this code to the wp-config.php file in your WordPress root directory.


define('EMPTY_TRASH_DAYS', 1 );


The 1 in the code signifies you want to empty the trash everyday. If you use a value like 5, it will empty trash every 5 days. If you set to 0, the trash functionality will be disabled and the ‘Delete Permanently’ button will appear instead of ‘Trash’ button and then you can delete posts and comments permanently without any alert. Remember to always backup wp-config.php file before editing it or your blog function may be disrupted.


Now never click Empty Trash ever again.





Related articles you might like ...

Update WordPress Secret Keys for Better WordPress Security

Over the years, WordPress secret keys have added to WordPress security. Update your WordPress secure keys and log out all users to enhance your WordPress security.


WordPress Security Keys


I had an opportunity to check some old WordPress blogs and they had outdated incomplete WordPress secret keys. WordPress Secret Keys was a WordPress security feature introduced 3 years back in WordPress 2.5 for better cookie security.


While earlier the WordPress secret key was one line of extra long random code, over the years it is now 8 lines of complex random code. This is what it looks like in current wp-config.php files.


wordpress secret keys


The 8 security keys are AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY; with corresponding salts: AUTH_SALT, SECURE_AUTH_SALT, LOGGED_IN_SALT, and NONCE_SALT will ensure your site is harder to hack and crack by WordPress hackers.


WordPress Secret Key Generator


So how do you create that kind of random code? The old secret key generator created only 4 lines of code, but the new secret code generator will create 8 lines of code for you to cut and paste into your WordPress wp-config.php file.


Remember to use a simple text editor (I use Notepad++) else you might mess up your most important wp-config.php file.  Remember changing these values will invalidate all existing cookies and logout all WordPress users on your site.


Check your WordPress wp-config.php in your WordPress installation directory now and confirm if 8 lines of secret keys exist. Anyway it is a good idea to change it sometimes and logout all users, just incase some hacker is secretly logged in. Good luck.


NB – Edit wp-config.php only if you know what you are doing, else your site could go offline easily. Try at your own risk or seek professional WordPress help.





Related articles you might like ...

Got VaultPress Secure WordPress Backup [Review]

Now QOT is backed up on VaultPress secure WordPress backup service. Vaultpress backs up your entire WordPress database and important site files in real time so that your blog can be backed up easily if hacked.


Why Vaultpress WordPress Backup?


There are many WordPress backup services available. Vaultpress is created by Automattic, the same people who brought you WordPress, which powers millions of blogs. So I trust them to best understand the technology which goes behind powering WordPress, and how to back it up.


Vaultpress Golden Ticket


Vaultpress is not available to public at large since it is in beta. First you need to apply for golden ticket. They are giving away 60 Vaultpress golden tickets per day, so if you have a reputed  blog, chances are you will get in 1-2 days.


Once you get a Vaultpress invite in your email, simply sign up. The Golden Ticket is your plugin.


Download Vaultpress


Download Vaultpress WordPress Plugin


Download Vaultpress plugin, a simple php file, and add to your WordPress plugin folder. Activate and you are done. Vaultpress will start to download all your Uploads, Themes, Plugins, and Database one by one automatically.


Vaultpress  Sync


We got impatient as our database was downloaded only 10% after a few hours. A frantic email to support revealed,  it is normal as they do not want to overload our server. Our entire site backup took nearly 1 full day, but then QOT has a large database. Most sites will upload much faster.


So now we have realtime backup of our site


Vaultpress panel


VaultPress Cost?


Vaultpress Beta does not come cheap at $15 per month. We opted for the basic plan which gives us comprehensive backup of entire WordPress installation.



  • Realtime Core Table Backup

  • Non Core Table Backups

  • Unlimited Snapshots

  • Downloadable Archives

  • Stats, Activity Log, Support


If you decide to get the Premium Vaultpress plan, it would cost you $40 per month, but will include Security Monitoring as well.


How Vaultpress Can Improve?


Vaultpress backs up all your files in realtime, which can cause considerable load on shared hosting, so you might want to think. We experienced some increase in server load, and they throttled from the backend, and advised we enable FTP /SSH access to take load off the server, but I am not happy entering my FTP /SSH passwords in a third party plugin.


Secondly, many bloggers would not be  interested in  hourly back up of blogs, once or twice a day would be enough, but there is no option to configure that – though many busy blogs would find a realtime back up very useful, to keep comments and latest blog posts safe.


Note Vaultpress backups up only the plugins, themes, uploads and database. So if you have files in the root directory, extra files, htaccess etc, they will not be backed up. Also note you can download these backup files, they will not restore them for you in one click if  your server crashes.


I have had a chance to contact Vaultpress support a few times, and it seems they are available US time as that is when replies occur. A fast response time will go a long way to enhance customer trust. Also an affiliate program will help bloggers recover the Vaultpress expenses and help the service grow. But then its still in beta.


Get VaultPress


Vaultpress is definitely not cheap at $15 per month. But if your blog makes decent advertising revenue, you can afford to spend a small fraction of your profits on backing up your blog in real time, so that you can restore it when you need it. Hackers are for real and servers do crash and your hosting backup might get corrupted. The earning blog is the lifeline and income resource for many full time bloggers, and spending a few dollars more will guarantee you a better sleep at night, so even if hackers strike, your blog is safely backed up at Vaultpress.





Related articles you might like ...

How to Add Unique QR Code to All WordPress Blog Posts Easily

Want to add a unique QR Code to all WordPress blog posts? QR codes are a great way to let mobile users use QR code readers to visit urls and get custom experiences in a click.


Add QR Code


Use Google Chart API to generate unique QR codes for each WordPress blog post. Simply add the following code in the your single.php file where you want the QR code to appear.


<img src="http://chart.apis.google.com/chart?cht=qr&chs=150x150&chld=L|4&chl=<?php the_permalink(); ?>" width="150" height="150" alt="QR code" />


QR Code Parameters


Here is the break up of the QR code parameters which you can change


http://chart.apis.google.com/chart? -  calls the Google Chart API


cht=qr chooses to display the QR code option


&chs=100x100 calls for the 100 px square size


&chld=L|4 – call for default error correction level and margin (in rows). So want more white border around the code, increase the 4


&chl=<?php the_permalink(); ?> call for the permalink of the single post. Use the url you want.


This will add QR codes of size 100px x 100px to your site. You can change the 100 to 200 or whatever pixel size you like as per your blog template. But remember that very small QR codes are difficult to read by many QR code readers.


So for the main page, I can use this
http://chart.apis.google.com/chart?cht=qr&chs=200×200&chld=L|1&chl=http://www.quickonlinetips.com


QOT QR CODE


Scan it with your QR code scanner and see if it works.





Related articles you might like ...

How to Change / Shorten Excerpt Length in WordPress

Most index pages, archive pages in WordPress display excerpts of 55 words. How can you change, or shorten excerpt length (or even increase it) easily.


If you look inside your WordPress theme index.php or archive.php, you will find this excerpt tag coming beneath the post title, which displays post excerpt in the front page or archives, category pages.


<?php the_excerpt(); ?>


It will display 55 words by default and then end abruptly with [...]. So how can you change excerpt length?


Change excerpt length in WordPress


Edit your theme functions file functions.php and add the following code at the bottom just above the last line of the code ?>


function new_excerpt_length($length) {
return 20;
}
add_filter('excerpt_length', 'new_excerpt_length');

Remember to place it just above the last line of the code ?> or your functions.php file may become unusable. Change the 20 and use and number to specify the words you want to display in excerpts.


Its a good idea to backup your themes file before editing it, as any error will give major WordPress theme errors. And then you would have to FTP your site, and restore the functions.php to the previous one.





Related articles you might like ...

How to Beef Up Your Wordpress Security

Guest post written by Thomas Frank. How can you increase your WordPress security. WordPress is a popular blog platform that has, in recent months, transformed into a great content management system.


As with any good CMS, WordPress has some security features built into its core. However, the default installation is still vulnerable to certain attacks. Fortunately, there are several easy steps you can take to harden WordPress against these attacks.


locked.


Common WordPress Attacks


Here is a listing of the most common types of WordPress attacks:



  • Brute-force login attempts – This is an attack where a bot or script continuously tries to login to your WordPress Dashboard as the admin in order to gain Administrator access to your blog.

  • SQL injection attacks – Attacks like these use input boxes on your site (login forms, comment forms, etc) to try to inject malicious SQL code into your WordPress database.

  • Spam comments – Many bots simply come to your website and post spam comments to build backlinks to their owners’ spam sites. Most of these comments are obviously spam, but some can be surprisingly legit-looking. Usually, though, you can tell spam comments apart from others by their very general nature and suspicious-looking username, even if the spelling is good.

  • Attacks against old versions of WordPress – As WordPress is open-source, its code is available for anyone to view. One downside of this is that hackers can easily exploit bugs in the code. The result of this situation is that old versions of WordPress are constantly under attack by scripts design to exploit bugs or flaws.

  • Attacks against vulnerabilities in plugins – Even if your WordPress installation is up to date, plugins can be a security issue as well. Many WordPress attacks are crafted specifically to exploit bugs or known vulnerabilities in plugins, so having a lot of plugins can potentially open up your site.


Fortunately, protecting WordPress against these attacks isn’t terribly difficult. Here is a listing of things you should do:


Keep WordPress and related files updated


Keep your WordPress installations updated to the latest version. As of right now (3/1/2011), the latest version is 3.1. 3.2 is set to release sometime this year. Make sure to update plugins as well. As noted above, out-of-date plugins can pose security risks.


If you have a bunch of plugins that are deactivated or unused, it’s best to delete them. Each plugin you have can pose a security risk if there is a flaw in it. If you have a plugin you plan on using later, store it outside of your WordPress installation until you need it.


Create security through obscurity


This security concept is based around the fact that most automated attacks will target default WordPress parameters. Therefore, make sure your installation doesn’t have these default parameters. Delete the user ’admin’. Brute force attacks will almost ALWAYS try to login with this username.



  • If you’re just setting up your WordPress installation, you should be able to change this name from the get-go when going through the configuration process.

  • If you already have an established installation, you can simply change the admin username via the command line. Find your installation’s database and enter the following SQL statement:


// Note that you should replace 'prefix' with your table prefix and 'newusername' with your desired admin username.
update table prefix_users set user_login='newusername' where user_login='admin';

Do not use the “wp_” table prefix for the tables in your MySQL database.



  • The database linked to your WordPress installation has a number of tables that drive the installation’s functions. For continuity’s sake, all the tables have the same prefix; some examples under the default prefix are wp_posts and wp_comments.

  • You should change the prefix to something other than “wp_” when first installing WordPress. Almost all SQL injection scripts out there will attempt to access tables with this prefix, so you’re unfathomably more well-protected by doing this.

  • Access your associated MySQL database (always good to make a backup first), and start renaming all the tables. If you haven’t installed WordPress yet and are on first time setup, you can skip this step. Example:


Rename table wp_comments to wangchung_comments;


  • You’ll also need to change the table prefix in wp-config.php, as shown here:


/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
= 'wangchung_';

You may notice that doing this locks you out of you Administrator account. No worries! There’s just a couple more commands to issue at the MySQL command prompt:


UPDATE newPrefix_options SET option_name = REPLACE (option_name, ‘oldPrefix_’, ‘newPrefix_’);
UPDATE newPreifix_usermeta SET meta_key = REPLACE(meta_key, ‘oldPrefix_’, ‘newPrefix_’);

Blocking access to unneeded information


WordPress can give away too much information. Here’s a couple ways to prevent it from doing that: Prevent WordPress from giving specific error messages upon unsuccessful login attempts.



  • WordPress, by default, will tell you when you’ve entered a wrong username or password. If someone is trying to guess these things, these error messages can sure help them narrow down their choices! It’s best to make WordPress throw a generic error instead. Open up the functions.php file, which is in wp-content/themes/yourtheme and add this line to it (somewhere outside of a function):


// code to hide feedback upon unsuccessful logins
add_filter('login_errors',create_function('', "return 'Please try again.';"));

Move wp-config.php up one directory


Moving this file out of your public folder makes it less accessible. WordPress is built to check for this file one directory up if it can’t find it in the default location.


Prevent malicious modification of the GlOBALS and $_REQUEST variables


Many attacks will attempt to inject malicious scripts into your database. Prevent this by adding the following code to your .htaccess file:


Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]

Back up, back up, back up


Regularly back up both your WordPress files and your database. The more you post content to your site, the more you should back up. This is not only to protect you from the bad guys, but also from yourself when you try new things



  • You can use an FTP program such as FileZilla to back up your files to your local computer.

  • Refer to the plugin list below for a great plugin that will help you regularly back up your database.


Essential security plugins



  • Akismet – Comes pre-installed with WordPress, although you’ll need to apply for an API key to use it. You can do this through Akismet’s options panel in the Dashboard.

  • AntiVirus – keeps your blog protected from spam and malicious scripts.

  • Capability Manager – Allows you to fine-tune the capabilities of each user role. For example, you could give Contributors the ability to publish posts.

  • IP Ban – Allows you to ban IPs from seeing your site. This can be useful, but I don’t recommend simply banning every IP that tries to log in as admin. Most of these are spoofed, and DHCP will make them change anyway.

  • Limit Login Attempts – limits the amount of times an IP can try to log in before locking it out for a specified amount of time. You can also configure it to lock out that IP for a much, much longer time upon a certain number of lockouts.

  • SI CAPTCHA Anti-Spam – places a CAPTCHA on your login page. This, coupled with Limit Login Attempts, should keep out brute force bots forever.

  • WP-DBManager – part of good security is having backups, and this plugin does backups really well. It’ll back up your database upon schedule intervals, and you can even set it to email you the resulting .sql file.

  • WP Security Scan – scans your WordPress installation for vulnerabilities and alerts you to them. It can, in some cases, even fix them. I DO NOT recommend using this plugin to change your table prefix, however. That’s something you should do manually.


You can never be too careful these days when it comes to security. Luckily, these precautions will keep all but the most determined hackers out of your site. Happy blogging!


Guest author Thomas Frank is the founder of College Info Geek, a college success blog with a heavy focus on technology. He is a sophomore at Iowa State University studying management information systems and speech communication. Connect with him on Twitter. Licensed image courtesy of Flickr user Max Klingensmith.





Related articles you might like ...