How to clean up and optimize wordpress database

Keeping your wordpress database is very important for wordpress database. In this article we explained, How to clean up and optimize wordpress database. This will improve your site speed aslo. Many times you install the wordpress plugins and some time you dont want that plugins and you delete that plugins.

How to clean up and optimize wordpress database

There is very nice wordpress plugin is avilable for database backup.

WP-DB-Backup

WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
But that plugins create some tables in your wordpress database. You need to remove that tables from your wordpress database.
Imp note: when ever you are cleaning the database or deleting the unwanted tables from wordpress database. Please consult with your web administrator.
Dont forget to take a full backup of your database.

This tutorial should be forward-compatible with WordPress 3.0

  • Install WP-DB-Backup by Austin Matzko
  • Mouse over Tools so that the down arrow appears
  • Click the down arrow
  • Click Backup
  • You’ll see something like this:
How to clean up and optimize wordpress database
How to clean up and optimize wordpress database

On the left are the default database tables included with WordPress. All of these are included every time you backup. The only thing you have to decide here is whether to exclude spam comments from being backed up (I recommend this) and whether to exclude post revisions (I recommend excluding these too, unless you have a specific reason for keeping revisions).

On the right is a list of additional database tables, most of which were probably created by plugins. There’s also a table called that will end with the name “commentmeta” – this can be used by plugins.

If your plugins have created a lot of data that you would like to save, or you’ve spent a lot of time configuring particular plugins, you’ll want to backup these tables. Otherwise, you can keep your database backups smaller by not checking them.

  • Next we see the Backup Option. There are three choices here:

A. Save to the server

This will save a backup of your database as a file on your web server. I don’t recommend this.

B. Download to your computer.

This will create a database backup file that you can save to your local computer.

C. Email backup to:

This allows you to send a copy of the backup to any e-mail address you’d like.

  • Let’s go ahead and download a copy to our hard drives now.

Check options you want in the Tables section then click “Backup now!”

You should see a progress bar, and when that’s done your browser will prompt you to save the file. You can save this file wherever you’d like.

  • There’s another section called “Scheduled Backup.” This is where this program gets really great.

Here we can schedule a backup to be e-mailed to a particular e-mail address however often we’d like. I recommend checking selecting “Once Daily.”

  • On the right, you’ll see that list of optional tables again. Check the ones you want to backup every time the backup runs.
  • Enter the e-mail address you want the backups delivered to in the “Email backup to:” field.
  • Click “Schedule backup.”
  • You should now get a backup file as an e-mail attachment every day. You should save these attachments to your local computer. If you’re using Gmail or another web mail host that has a lot of storage space, you might want to leave your databases on their server as an additional off-site backup. Be aware that that’s an additional security risk – if your e-mail account is ever compromised, the would have access to all of your database backups.

Restrict the Adults on wordpress website

Restrict the Adults on wordpress website, Many times you website content is not suitable for all the age group. There is very nice wordpress free plugin available.

Restrict the Adults on wordpress website

Restricted to Adults

There’s a lot of content which isn’t appropriate for all ages. The [Association of Sites Advocating Child Protection (ASACP)](http://www.asacp.org/ “ASACP) has developed the Restricted to Adults (RTA) tag which most online protection software respects.

Restrict the Adults on wordpress website
Restrict the Adults on wordpress website

Installing the RTA tag on a WordPress install can be somewhat complicated, so the Restricted to Adults plugin makes it one click — activate the plugin and your site is restricted to adults.

how to do persistent database connection in wordpress

Here in wordpress tutorial, we explained, how to do persistent database connection in wordpress. Persistent connections are links that do not close when the execution of your script ends.

What is persistent database connection?

Persistent connections are links that do not close when the execution of your script ends. When a persistent connection is requested, PHP checks if there’s already an identical persistent connection (that remained open from earlier) – and if it exists, it uses it. If it does not exist, it creates the link. An ‘identical’ connection is a connection that was opened to the same host, with the same username and the same password (where applicable).

how to do persistent database connection in wordpress
how to do persistent database connection in wordpress

If you want to use the persistent database connection then you should follow my steps:

how to do persistent database connection in wordpress

First Open the wp-db.php file from wp-includes folder. In that file find following words:


// @mysql_connect( $dbhost, $dbuser, $dbpassword, true );

//Change that to

@mysql_pconnect( $dbhost, $dbuser, $dbpassword, true );

comment the mysql_connect line. This line you will find two times in that file. You need to change the line both the times. Then upload this file to your wordpress installation.

Persistent database connection will open only one connection and for every query that will check for connection is present or not. If connection is already present then your query will execute using that persistent database connection.

There are couple of issues with persistent database connection, When you are using the persistent connection you should keep following things in mind.

Imp: There are a couple of additional caveats to keep in mind when using persistent connections. One is that when using table locking on a persistent connection, if the script for whatever reason cannot release the lock, then subsequent scripts using the same connection will block indefinitely and may require that you either restart the httpd server or the database server. Another is that when using transactions, a transaction block will also carry over to the next script which uses that connection if script execution ends before the transaction block does. In either case, you can use register_shutdown_function() to register a simple cleanup function to unlock your tables or roll back your transactions. Better yet, avoid the problem entirely by not using persistent connections in scripts which use table locks or transactions (you can still use them elsewhere).

How to publish wordpress feeds later

When you publish your post,the feed an published to the whole world.That’s very annoying thing. publish wordpress feeds later, That is always good from SEO.

How to publish wordpress feeds later

How to publish wordpress feeds later
How to publish wordpress feeds later

Some times you need to change the content or change the url, that time you got the errors

The following example publishs the post 10 minutes later in your feed:


/**
 * puplish the content in the feed later
 * $where ist default-var in WordPress (wp-includes/query.php)
 * // Apply filters on where and join prior to paging so that any
 * This function an a SQL-syntax
 */
function publish_later_on_feed($where) {
 global $wpdb;

 if ( is_feed() ) {
 // timestamp in WP-format
 $now = gmdate('Y-m-d H:i:s');

 // value for wait; + device
 $wait = '10'; // integer

 // http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
 $device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

 // add SQL-sytax to default $where
 $where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
 }
 return $where;
}

add_filter('posts_where', 'publish_later_on_feed');

You need to open the your wordpress themes functions.php file and put above code in that file. Using this function your feed will publish after 10 minute of your wordpress post publishing.

increase the upload_max_filesize in WordPress

The default upload file size is in php settings is 2 MB and for wordpress also default upload size is 2 MB. File upload size is dependent on PHP settings of your server. Upload size is also dependent on your hosting plan or hosting service provider. For shared hosting most of time you cannot increase the file upload limit.

increase the upload_max_filesize in WordPress

When we try to upload big size image or media files in wordpress we got the following error

The uploaded file exceeds the upload_max_filesize directive in php.ini
For fixing the issue use following steps
Use the php.ini file from root folder.

1. Find this line in the php.ini file in your php installation upload_max_filesize = 2MB and replace it with a higher value (e.g. upload_max_filesize = 64MB)
2. Search for this line in your php.ini file post_max_size and increase it.

If you don’t have a php.ini file in your directory,
you can usually generate one from the control panels of your host. or create the file and put following values in that
memory_limit = 32M
upload_max_filesize = 100M
upload_max_filesize = 100M
post_max_size = 100M

increase the upload_max_filesize in WordPress
increase the upload_max_filesize in WordPress

This file is copied into your wp-admin folder, the problem should be solved.

wordpress plugin rss feed widget

We collected unique RSS feed wordpress plugins which will increase your wordpress website visitors incredibly. Here list of wordpress plugin rss feed widget

Category Specific RSS feed Subscription

This WordPress Plugin allows you to present a menu with multiple RSS feed subscription option to your site’s visitors in addition to your normal RSS subscription option.

wordpress plugin rss feed widget

wordpress plugin rss feed widget
wordpress plugin rss feed widget

If your site covers multiple topics then your subscribed readers may get annoyed when you update your site with content that they are not interested in and they get a notification in their RSS reader.

I found that most of the time I never subscribe to a site’s RSS feed when it doesn’t have the topic/category specific subscription option, specially when the site covers multiple topics cause I don’t like to be hammered with all the unwanted content updates.

This plugin allows you to configure up to 8 different topic specific RSS feeds.

http://wordpress.org/extend/plugins/category-specific-rss-feed-menu/

WWSGD Plugin

This plugin which uses name of one of the top web celebrity Seth Godin, allows you to display a subscription reminder message above or below blog post.

You can control position & content of message. Also you can customize if message is to be displayed always for only or few initial page views.

What Would Seth Godin Do

Vertically scroll rss feed

his plug-in will scroll the RSS feed title vertically in site sidebar, admin can add/update the RSS link & style via widget management. Internet connection is required to load third party RSS.

  1. Easy installation.
  2. Widgets, so you can add pretty much anything.
  3. Easy style-override system.

Click on the configure button (small down triangle) for the ‘Scroll RSS Feed’ widget and here you can customize all the Scroll RSS Feed front end styles.

http://wordpress.org/extend/plugins/vertically-scroll-rss-feed/

Show RSS Feeds

Displays RSS feed in templates

http://wordpress.org/extend/plugins/show-rss/

Feed Widget Plugin

This plugin will add a WordPress widget, which will display links to various relevant feeds for your WordPress blog. It will always at least display links to the two standard feeds: All Entries and All Comments. It will also display links to category feeds, post feeds or search feeds, depending on the current page being viewed.

I used this long time back. But now this blog have three top level feeds, so I guess using this plugin here will result in too many options. I will definitely add this plugin to my orkutfeeds blog.

Feed Widget Plugin

JP’s Get RSS Feed

This plugin uses WordPress’ ability to return feeds, to get the last X number of items from a given RSS feed. Display the last few items from any RSS feed of your choice. For example, your Twitter feed, or another blog or forum that outputs a RSS feed. Any RSS feed can be grabbed. Call it in your footer to list your last few tweets, and your sidebar to showcase content from another one of your blogs.

Uses fetch_feed, which was introduced in WordPress 2.8. Works and tested in WordPress 2.9.

http://wordpress.org/extend/plugins/jps-get-rss-feed/

URL Absolutifier WordPress Plugin

URL Absolutifier changes all relative URLs in posts to absolute URL, to make the entries work in feed readers that don’t work with relative URLs.

I used a relative URL trick for higher earnings from AdSense product referrals long time back. If you are not sure about your usage of relative URLs then I will strongly recommend you should activate this plugin and then just forget it. I really feel this should be default behavior of wordpress.

URL Absolutifier WordPress Plugin

Full Text Feeds

There was a bug in wordpress which used to cut your feeds in the middle of the post. This behavior used to annoy blogger who like to publish full text feeds.

I am not sure if this bug is fixed in latest version of wordpress as I have modified wordpress core feed files completely when applying firefox full feed hack.

Anyway, if you see partial feeds even after choosing option to display full feeds, you can use this plugin to overcome wordpress bug.

Full Text Feed Plugin

RSS FEED anywhere

You only have to place the swf-file on a server (free-hosting..) and edit the embed-Tag. Finished! With the proxy-feature, you are allowed, to feed your RSS-Stream from anywhere. (Myspace etc.)

You also can get your RSS-Feed from free hosts wordpress.com blogs. (without upload or edit the template files or stuff like that.) You dont have to place a crossdomain.xml (thats useful, because in some cases thats not possible: if you dont have enough permissions.. etc) on your Server! (you can, if you want to disable the proxy-function. But you dont have to! 🙂 )

http://wordpress.org/extend/plugins/rss-feed-anywhere/

FeedBurner FeedSmith Plugin

If you use FeedBurner and love its subscriber count chicklet, then this plugin is must for you.

WordPress have lots of feed formats and most probably you had burnt only one of them with FeedBurner. Now if a user access your wordpress feeds via other URLs then their subscription will not be counted towards FeedBurner count.

This plugin will take care of this. You just give it your FeedBurner URLs and it will redirect all wordpress custom feed requests to your FeedBurner feed.

Originally developed by Steve Smith, this plugin is now officially maintained by FeedBurner.

FeedBurner FeedSmith Plugin

Feed Footer Plugin

This plugin allow you to customize footer text of each post in feed completely. I use this to show referral ads in my feeds. Please do not try AdSense or any JavaScript code in Feed Footer. It will not work as feed readers ignores JavaScript.

This plugin is really basic, but I don’t mind taking some efforts for some extra bucks.

Feed Footer Plugin

RSS Footer

This is very simple plugin. It allows you to insert any message including HTML code into the feeds. You can also choose if added message is to be displayed at top or bottom of the post.

You can use this plugin for advertising instead of above Feed footer plugin. Main difference is, RSS Footer adds same footer at the end of every post, while above Feed footer allows you to add different footer for each post.

One plus point with RSS footer is, it allows addition of link back to your original post, which is good SEO as explained by Daniel Scocco.

RSS Footer Plugin

Similar Posts for Feeds Plugin

Many time, by giving full text feeds, blogger feel they are loosing page-views as a reader may never check their blog.

I use backlinking to my old posts whenever possible to bring readers back to the blog. But often such links go unnoticed or you may not find old post to link back if you are writing on a new topic.

Then its always good idea to display few related posts at the bottom which often attracts clicks. Of course too many links may annoy your reader. So do not show something like 20 related post!

 

Ten wordpress plugins for improve User interactivity

When you are developing the website or blog using wordpress. You need to think about readers experience on your website. Keeping user experience in mind I created the list of wordpress plugins which are very useful for user interactivity and experience.

 

Ten wordpress plugins for improve User interactivity and experience

1. WP-Print

This Plugin displays a printable version of your blog when the reader requests for it. The user can directly take a print out from it. The documentation can be found here.

There is also another print widget by HP. This adds a print option to your blog posts. This plugin is available for WordPress and Movable type. This plugin can also convert blog posts into PDF files.

Download WP-Print

2. Convert to PDF

Converting your blog posts into PDF is useful when your blog has more content on tutorials and tips & tricks. Amit has written a post on how to save the blog posts to PDF file. Adding a “Save as PDF” button is really simple process. All you need is to add this link at the end of blog posts (for WordPress users).

http://savepageaspdf.pdfonline.com/pdfonline/pdfonline.asp?cURL=php the_permalink();?>

Blogger users can update the cURL link with the post permalink. This generates a PDF file which can be saved to hard disk.

3. Related Posts

As the name indicates, this plugin will show the related entries for a particular post based on keyword matching.

Download Related Posts

4. WP-Email

This Plugin helps readers to share posts on blogs which they liked with their friends or even to their email. The plugin is easy to use and configure. The documentation can be found here.

Download WP-Email

5. Subscribe to Comments

Subscribe to Comments 2.1 is a plugin that allows commentators on your blog to check a box before commenting and get e-mail notification of further comments. This is useful to have a good discussion going on in your posts.

Download Subscribe to Comments

6. Popular Contest / Top Posts by Category

Popularity contest will help you see which of your posts are most popular and the Top posts plugin displays your top rated posts categorywise based on comments or page views.

Download Top Posts by Category

7. Related posts in your Feed

This WordPress plugin adds a list of Related Posts to your full text feed. For this plugin to work properly you need Related Posts plugin or Ultimate Tag Warrior

plugin activated.

Download Related posts in your Feed

8. qTranslate

Ten wordpress plugins for improve User interactivity
Ten wordpress plugins for improve User interactivity

Multilingual support is one of the biggest missing features of WordPress, but with qTransalate you can easily accomplish the task of managing different languages for your blog site.

http://www.qianqin.de/qtranslate/

9. Contact Form 7

Even though there are tens of contact form plugins out there, I’ve always liked Contact Form 7. The problem with most contact form plugins is that either they are too simple or way too complex. Contact Form 7, on the other hand, is extensible yet easy-to-use. It supports Ajax-powered submitting, multiple forms, CAPTCHAS, and Akismet spam filtering.

http://wordpress.org/extend/plugins/contact-form-7/

 

10. Display Thumbnails For Related Posts in WordPress

by adding thumbnails to related posts using the popular YARPP plugin and WordPress custom fields
http://buildinternet.com/2009/07/display-thumbnails-for-related-posts-in-wordpress/

how to add users in wordpress website

If you’d like your blog to feature posts from multiple authors, how to add users in wordpress website, you can add as many administrative accounts to your blog as you like. There are two different ways to add users. There are two different ways to add a new user to your blog, depending on whether or not that person already has an account at WordPress.com.

how to add users in wordpress website

how to add users in wordpress website
how to add users in wordpress website

 

To add someone who already has a WordPress.com account:

  • Log in to your dashboard.
  • Click on the Users -> Authors & Users menu option.
  • In the Add User From Community section at the bottom, enter the author’s email address in the User E-mail box
  • Select either Contributor, Author or Editor in the Role list
  • Click the Add User button
  • Your new user will now see your blog listed in their dashboard when they log in to WordPress.com.

To add someone who does not have a WordPress.com account:

  • Log in to your dashboard.
  • Click on the Users -> Invites menu option.
  • Enter the author’s first name, last name and email address in the appropriate fields.
  • Check the box labeled Add user to my blog as a contributor.
  • Click the Send Invite button.
  • Your new user will receive an email inviting them to sign up for a WordPress.com account (and, optionally, create their own blog if they want). Once they have signed up, you’ll see them listed as a Contributor on your Users tab. You can change them to a different role (Author or Editor) later if you’d like.

The difference between each of the roles is explained in the User Roles documentation.

Warning: Please be very careful when adding a new Administrator user to your blog. Other Administrators are effectively co-owners. They have as much power over your blog as you do, including the ability to permanently delete it.

Transfer Note: For security purposes, there is no way to remove the original creator/owner from their blog. As such, if you wish to transfer your blog to another user/account, please follow the instructions here.

Video

Watch the “Adding users to your blog (or removing them)” video from WordPress.tv.

Adding users to your blog (or removing them)

Adding users to your blog (or removing them)

This movie requires Adobe Flash for playback.

Watch the “Inviting your friends to WordPress.com” video from WordPress.tv.

Inviting your friends to WordPress.com

Inviting your friends to WordPress.com

This movie requires Adobe Flash for playback.

Was this Helpful?


How to wordpress change admin username

You cannot change a WordPress.com account username once it has been set. However, you can change what is seen on your posts and comments by changing the display name (nickname) in your profile, or you can create a new account and transfer your blog(s) to the new account.

How to wordpress change admin username

wordpress change admin username
wordpress change admin username

Change Display Name (Nickname)

1. Access your User Profile

2. Change the value next to Display name publicly as under Basic Details

3. Click Update Profile.

↑ Table of Contents ↑

Change Username

1. Log into your current account (using your existing username)

2. Access your Personal Settings and change the e-mail address to another email address. This will free up your primary e-mail for use with the new username.

3. Once the new address has been verified via email confirmation, log out of the account.

4. Go to http://wordpress.com/signup/ and attempt to register a new account (the username you wish to change to) with your e-mail address.

5. If you’ve got a blog you should transfer its ownership to your new username.

Once you’ve done all of that you’ll be rocking WordPress.com with your new username.

via Change Your Username « Support.

how to prevent spam comments wordpress

If you are internet user then you know about what is spam. You know or saw spam emails earlier so many times. prevent spam comments wordpress is big task and important also.

how to prevent spam comments wordpress

how to prevent spam comments wordpress
how to prevent spam comments wordpress

Comment Spam Hacks

The following are not recommended for average users. They involve editing WordPress core files. BACKUP your files first.

  • Delete wp-comments-post.php

The ultimate end-all solution to your comment spam troubles. This will effectively disable comments and is good for stopping comment spam floods. No one will be able to comment on your WordPress site.

  • Delete wp-trackback.php

The ultimate end-all solution to your trackback spam troubles. This will effectively disable trackbacks and is good for stopping trackback spam floods. This will mean that no one will be able to trackback your posts, so do this after consideration.

  • Denying access with .htaccess

While drastic, you can make modifications in your .htaccess file if you are using an Apache server. Check the Internet and Apache for more information.

  • Use nofollow

The nofollow attribute is another method used to strip spammers of their page ranks. According to Google, “when Google sees the attribute (rel=”nofollow”) on hyperlinks, those links won’t get any credit when we rank websites in our search results.” Under WordPress v1.5, the nofollow attribute is automatically added to all links in the comments section.

WordPress comes with a pre installed antispam solution – Akismet.

In order to use Akismet, you should have a WordPress API key. To receive a WordPress API key, you should register at the official WordPress website. The key will be included in your welcome mail.

If you already have a registration at WordPress.org, you can see your API key by visiting the WP dashboard.

To enable Akismet for your blog, follow the steps below:

Step 1. Go to your WordPress admin area > Plugins > Installed.

Step 2. Click Activate.

There are many ways to protect your WordPress.com blogs from unwanted comments:

* WordPress.com blogs are protected by the Akismet comment spam filter.
* You can control whether comments are automatically approved or if they need to be reviewed before they are published.
* You can add rules for comment moderation to control which comments get marked as pending.
* You can add rules to the comment blacklist section to automatically mark some comments as spam.
* If you turn on email notifications, then you can watch those messages for spam and delete them quickly if you find any that get through the comment spam filter.

Akismet learns by those who mark comment spam as comment spam and legitimate spam is despammed. If your comments are being caught by Akismet, remove them from the Akismet Panel. It might take two or three times, but it will learn and automatically not designate your comments as spam.

Commenters on your blog may have their comments caught by Akismet. If you do not regularly check your Akismet Panel, have an easy way of allowing readers to email you if their comment did not appear.

With updates to the database and major changes to the software, this process may have to be repeated.

If you continue to have problems with Akismet catching your comments or too many of your readers’ comments, contact Akismet for more assistance.