Saturday, November 23, 2013

Optimizing WordPress - Checklist after installing

Once the WordPress installation is complete, the job is not finished! Far from it, you still have to optimize to get the best...
Optimizing WordPress - Checklist after installing

Optimize WordPress After Installation

Your new WordPress site is brand new? Your pages are ready, your relevant articles about to be published? Very well! However, before announcing its opening to the world, so do a quick check of the following:

Think A Speed Using A Cache

Caching is to create HTML pages to your server from the pages generated by WordPress. Then the server has only to view pages without making multiple requests normally required for their display. There are many plugins cache from simple Quick Cache or even W3 Total Cache and WP Super Cache. The speed is good for your visits and for your WordPress SEO.

Install and activate your cache plugin, once your site/blog finished.

The configure .Htaccess file for WordPress

.Htaccess files are configuration files for Apache web servers. They can be placed in any directory of the website (the configuration applies to the directory and all those in it who do not have such a file inside).

It is important to configure this file, including prohibiting changes on some files, prevent reading directories, compress, set the cache, etc... To learn more, I urge you to read the article.

Increase The Size Memory Limited Under WordPress

By default, WordPress is trying to increase the PHP memory to 32 MB to run. Consider changing this value to 64 or 96 MB to benefit from higher memory and improved performance. Edit your wp-config.php and add/change the following line:
define ('WP_MEMORY_LIMIT, '96M');

Disable And/Or The Limit Revisions Article

You've probably already noticed, WordPress keeps track of all changes to article. Practical course, but intensive space on the database. If you rarely use the revisions, consider disabling them through your wp-config.php:
define ('WP_POST_REVISIONS', false);
You can also limit the number (set to 3 in this example):
define ('WP_POST_REVISIONS', 3);

Delete Themes And Plugins Not Used

The water wets and fire it burns ;) It is obvious that any unused WordPress plugin should be disabled and removed, always better than the level of resources and the security of your WordPress. Regarding your WordPress themes not enabled, this takes place and it will inform each updated them, so get rid of!

His optimize WordPress Theme

Reduce the number of requests to the server database and reduce its overall weight. PHP remove unnecessary queries: For example, change your theme, replacing the PHP function your hard URL, thus avoiding an additional request to the Bdd. To do this, look for the call to function get_option('url') in your WordPress theme.

Reduce the number of requests to the server: Use the CSS sprites and copy the contents of all your CSS files into a single file, do the same for JS files. Increase the compression of these by removing white and / or comments to reduce their weight.

Clean The Base Of Basic data

The databases are optimized and maintain, so it is necessary to clean under penalty of slowdowns. There is a procedure through phpMyAdmin or even the WP-Optimize plugin.

You can also refer to section 15 useful queries for WordPress.

The Host Images And/Or Remain Their Loading

The images can be greedy sometimes, to relieve your server resources you can host them elsewhere (Amazon S3 in subdirectory, using a CDN).

The alternative is to decorate their loading. The principle is simple, I care and I display the image only when the visitor needs to see! To put in place, I recommend the free plugin Lazy Load.

Check Rendering Site On Different Browsers

We too often forget, there are still people who use Internet Explorer ;) In addition, it is necessary to control the display of your site on major browsers. Here is an article consisting of no less than 10 tools to test the display.

Check The Links And 404 Errors

When designing, you definitely placed moultes hyperlinks, make sure you have correctly spelled with Broken Link Checker. This allows to automatically checking in your articles, comments, and other content, broken links / broken and missing images and notifies you by email even if detected.

Before the launch of your website, remember to install the Redirection plugin to handle any (future) 301s and especially to keep track of all 404 errors generated.

Conclusion

Is a long way to go for anyone who wants optimize its site, and that this checklist is not exhaustive ... As a bonus below, tools and resources to improve the optimization of your WordPress:

Saturday, November 16, 2013

15 SQL queries very useful for WordPress

WordPress works with a MySQL database. WordPress all data such as messages, comments, categories and parameters are stored in the MySQL database.

Discover the diagram WordPress database on codex.wordpress.org.

15 SQL queries very useful for WordPress

Save Your Base From WordPress Basic data

In the preamble, before making any changes, remember to back up your data! You can download the plugin WP-DBManager to save your database using WordPress.

Here is the manual backup process via phpMyAdmin:
  1. Login to phpMyAdmin
  2. Select your WordPress database
  3. At the top, click Export
  4. Select all the tables
  5. Select to export to SQL format. Sql
  6. Check "Save as file"
  7. Choose the type of gzip
  8. Finally, click OK

How To Make A SQL Queries?

The easiest way to execute a query below is to use phpMyAdmin. The SQL Executioner plugin also allows you to run queries directly from the WordPress admin.

How to use phpMyAdmin
  1. Connect to the phpMyAdmin interface
  2. Select your WordPress database data
  3. Click the SQL tab
  4. Copy/Paste the applications you want to run
SQL  box


ATTENTION: All queries used in this article assume that your table prefix is "wp_", namely, the standard prefix for the WP tables in the WordPress installation. If you use a different table prefix (and this is recommended in terms of security;), consider changing the query accordingly.

WordPress SQL queries Practical & Useful

Change The Way Of Images

You have decided to use a CDN such as Amazon, after creating the CNAME, use the following query to change the path of your images to the CDN.
UPDATE wp_posts SET post_content = REPLACE (post_content, 'src="http://www.oldsiteurl.com', 'src="http://yourcdn.newsiteurl.com');
You will also need to change the GUID of attached images:
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsiteurl.com', 'http://yourcdn.newsiteurl.com') WHERE post_type = 'attachment';

Change The Name Of The User Default "Admin"

Each WordPress default installation creates an account with a user "Admin" default name. This can be a security problem because a hacker can easily force your WordPress admin.
UPDATE wp_users SET user_login = 'Your-New-Name' WHERE user_login = 'Admin';

The Change Password

Need to change or reset your password in WordPress, or even that of other users?
UPDATE wp_users SET user_pass = MD5( 'new_password' ) WHERE user_login = 'your-username';

Assign All Items From The author A TO B author

If you want to transfer items from the author A to B the author, it would be time to do it section by section. Use the following SQL query. You must first get the ID of two authors from the user profiles from your WordPress admin panel. Click on authors' names to view their profile. In the address bar, search for "user_id".
UPDATE wp_posts SET post_author = 'new-author-ID' WHERE post_author = 'ancient-author-ID';

Clear The Revisions

Any change or modification in WordPress causing a record in the database, here is an easy way to remove them.
DELETE a,b,c FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'

Delete Items From The Metas

When you delete a plugin, some information remains in the database (post_meta_table). Reduce the size of your database with this SQL query:
DELETE FROM wp_postmeta WHERE meta_key = 'your-meta-key';

Export Emails Some commentators

Get the email addresses of the commentators of your blog:
SELECT DISTINCT comment_author_email FROM wp_comments;

Clear Pingback

Pingback too? Here's how to remove them:
DELETE FROM wp_comments WHERE comment_type = 'pingback';

Delete All Comments Spam

You have many classified spam comments? Delete them at once:
DELETE FROM wp_comments WHERE comment_approved = 'spam';
  • 0 = Waiting for moderation
  • 1 = Approved
  • Spam = Marked as spam 

Identify Unused Tags

Here's how to identify unused tags on your WordPress:
SELECT * From wp_terms wt
INNER JOIN wp_term_taxonomy wtt ON wt.term_id=wtt.term_id WHERE wtt.taxonomy='post_tag' AND wtt.count=0;

Disable The Comments To The Old Articles

If you do not want to moderate the comments of your old items, you can disable these comments based on a date, use the following query:
UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2012-01-01'

Remove The Illegible Characters

You have character encoding problems? Instead of cleaning your articles and comments one-to-one, here are a series of queries to run to replace them
UPDATE wp_posts SET post_content = REPLACE(post_content, '“', '“');
UPDATE wp_posts SET post_content = REPLACE(post_content, '”', '”');
UPDATE wp_posts SET post_content = REPLACE(post_content, '’', '’');
UPDATE wp_posts SET post_content = REPLACE(post_content, '‘', '‘');
UPDATE wp_posts SET post_content = REPLACE(post_content, '—', '–');
UPDATE wp_posts SET post_content = REPLACE(post_content, '–', '—');
UPDATE wp_posts SET post_content = REPLACE(post_content, '•', '-');
UPDATE wp_posts SET post_content = REPLACE(post_content, '…', '…');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '“', '“');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '”', '”');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '’', '’');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '‘', '‘');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '—', '–');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '–', '—');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '•', '-');
UPDATE wp_comments SET comment_content = REPLACE(comment_content, '…', '…');

Disable All Your WordPress Plugins

A request to disable all your plugins:
UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

Search And Replace From Content In Your Articles

To easily replace content by another, use this SQL query:
UPDATE wp_posts SET 'post_content' = REPLACE ('post_content', 'Old_Text', 'New_Text');

Delete And / Or Replace A Shortcode In Your Articles

WordPress shortcodes that is always handy but when you change the WordPress theme, sometimes they are more compatible. Same SQL query as above, it can remove or replace your obsolete shortcodes.
UPDATE wp_post SET 'post_content' = REPLACE ('post_content', '[OldShortcode]', 'Anything or NewShortcode' ) ;

Tuesday, November 12, 2013

Reduce duplicate content in WordPress

Duplicate content is a wound to your blog; a parameter should not be overlooked for SEO...
Reduce duplicate content in WordPress

Will you take The Same?

Definition: duplicate content refers to the same content on two different URLs. The best known and most obvious is plagiarism or theft of content, but it also happens unintentionally, that the same page can be accessed by several different addresses on his own blog:
  • /mysite.com/mycategory/myarticle/
  • /mysite.com/tags/mynarticle/
  • /mysite.com/myarticle/
Another scourge related to WordPress, the "?Replytocom=xxxx" in direct contact with the responses to the comments of your article, it can be likened to duplication:
  • /mysite.com/myarticle/
  • /mysite.com/myarticle/?replytocom=21493
  • /mysite.com/myarticle/?replytocom=21523
Pagination category may also pose problems:
  • /mycategory/
  • /mycategory/page/2/
  • /mycategory/page/3/

How to Limit The Duplicate Content?

The Visible Measures

The first thing to do is to limit the list of your latest articles, best articles, etc ... on your sidebars and your footer, indeed they are often already present in the home, so no need to produce duplicate content by weight.

Remember to limit/truncate your items placed on the home page (think tag More, excerpt, etc...), this will prevent duplicate content between it and your articles.

The eradication ?Replytocom

Nothing is easier, if you use the plugin SEO by Yoast, visit SEO >> Permalinks and select "Delete variables?replytocom".

This prevents responses handled run when the user has JavaScript disabled,  but on a large site this can be a huge improvement in the efficiency analysis for the search engines when you have a lot of feedback and this limits the duplicate content.

Use The No Index And Follow

Consider your Settings Meta Site and do not index subpages archives, if you want to avoid/page/2/ and the following archive, appear in search results, select this option from the plugin via Yoast SEO >> General.

Also on SEO by Yoast, the Securities & SEO >> meta >> taxonomies menu, check the "meta robots: noindex, follow" categories, keywords and format. At the same place, since the other tab for the archives of the author and dates, check the "noindex, follow" boxes and "Disable archives."

If you have a site with a single author, archive section the author will always be similar to the home page. And even if you have no link to this section, others might do that will because you harm. Disable this section; you can be sure that the links will be redirected to this section (301) to the home page.

For the record date, the same principle applies: they are probably very similar to your home page, and can therefore be considered duplicate content.

Here is the version without the plugin, insert this code into your <head> & </ head> in the header.php file, will tell the robots you want to index your homepage, your articles, pages and categories, but prevent indexing of all other pages (RSS, archives, etc.):
<?php if((is_home() && ($paged < 2 )) || is_single() || is_page() || is_category()){
 echo '<meta name="robots" content="index,follow" />';
} else {
 echo '<meta name="robots" content="noindex,follow" />';
}
Note: $paged variable is the corresponding page number in case of pagination.

No Index On The Search Results

A result of WordPress search looks like this: /johnnygagnon.com/s=xxxxx. You can remove the indexing of these search results by placing the following code in your <head> in the header.php file:
<?php if ((is_search()) || (is_tag() )) { ?>
<meta name="robots" content="noindex,follow"/>
<?php } else { ?>
<meta name="robots" content="index, follow"/>
<?php } ?>

Avoid Duplicate Content From The Archives Categories

Level SEO and natural search, it is disadvantageous to have a page that contains exactly the same items in the same order, and with the same extracts, this bug has been known for several months WordPress developers Rebug and then corrected for over a year, nothing has changed...

Note that the bug is not present if you do not use the structure of permalinks, so /?cat=2 cannot reproduce the bug.
add_action('wp', 'baw_non_duplicate_content' );
function baw_non_duplicate_content( $wp )
{
 global $wp_query;
 // If the category name is found between the different game and rewrite the variable queried, then redirects
 if( isset( $wp_query->query_vars['category_name'], $wp_query->query['category_name'] )
 && $wp_query->query_vars['category_name'] != $wp_query->query['category_name'] ):
 // The correct URL where it replaces the category queried by his real name
 $correct_url = str_replace( $wp_query->query['category_name'], $wp_query->query_vars['category_name'], $wp->request );
 // Redirection 301
 wp_redirect( home_url( $correct_url ), 301 );
 // Always die() after a redirect
 die();
 endif;
}

Duplication In The Pages Of Categories

The main problem categories is that they show a list of items in the same order as the home page, one of the simplest ways to avoid duplication is to use a description of the said category.

This is a good solution but how to prevent this description is repeated on the following pages if paging? This code to insert into your category.php file, solve the problem.

Replace:
if ( ! empty( $category_description ) )
by
if (!empty($category_description) && $paged == 0)

Reminder: When you install WordPress, make sure that you have chosen your internal structure, categories or tags, how can I believe, is useful for my readers and try as much as possible, limit your keywords...

Thursday, November 7, 2013

Make Buzz - Increase your visibility

Increase its traffic, visibility, here is a legitimate concern of any self-respecting blogger...

Today I will present a free service I just tried a service that simply provides an exchange of visibility. So, ready to Buzz?


Make Buzz - Increase your visibility

WidgetBooster

Website: http://widgetbooster.com/
The objective of WidgetBooster network is to increase the visibility of your site, to save them notoriety and visitors. The principle is very simple; it is a trade wins/win:
  • Free: nothing to pay
  • Fair: small and large site, everyone is a winner
  • Multi-media: social and / or banners networks, you choose
  • Easy, customizable and automated: 5 minutes to configure all
There are two ways to be aired by the service:
  • Automated display your banners on other member sites
  • The delivery of your items from other members
The platform is built on a fair exchange principle. You give more visibility to other members, the more you earn. To make this fair, each of your sites has a credit account.

You start by earning credits as follows:
  • When you register
  • By exchanging banners
  • Or buzz third items
In return, your banner will be posted on the blogs of other members and / or article of your RSS feed will be powered ahead of new items buzzer. So your turn you get a buzz from other members.

The Themes, The Community

WidgetBooster is available in several themes and it is fortunate indeed to leave buzzer articles of others as much as it is on topics close to yours.

To date, more than twenty topics are available, if your blog talks mainly:
  • Arts
  • Goods
  • Decoration
  • Internet
  • Etc.
You might find a corresponding boost.

My Opinion On WidgetBooster

The principle is very interesting, we are far from the old viewers and community effect is a real plus. Registration is easy as long as you have chosen the right theme, the team of WidgetBooster validates your site, your feeds are loaded and you get as a new member of a capital of points available.

Its Advantages
  • Increased visibility, I have had so far two items buzz, the items have been posted on Facebook, retweeted and visits have really increased.
  • The opportunity to reach a new audience by chain effect in the community, you discover your articles / your blog to new readers.
  • Dissemination of custom banners, they are easily configurable, available in all sizes, with your cash or an image of your choice (you can see an example at the bottom right of this article).
  • Buzz the cost, and yes, it's free. You certainly do not earn money with WidgetBooster but surely visitors.
Its Disadvantages
  • An interface to improve the first steps WidgetBooster are confusing, you need a little patience to find your way. In their defense, they have many tutorials.
  • Failure to select the item to promote, and yes if you can choose the cash to put in place and they are crawls regularly, you cannot select the item to buzzer.
  • Counter negative points, in fact, if your item is a huge success with members, it will benefit buzzed, so your points will fly very quickly and you have to wait a while and earn point’s buzzant before have a new item at the checkout.
  • The points system, too opaque for my taste, what relates more points, how, how?
What do you think? Do you want to try to make WidgetBooster the Buzz?

Tuesday, November 5, 2013

Increase Your Twitter Followers

Increase Your Twitter Followers

The use of social networks is well known, takes time. Today I will introduce you to a program that will save you time and followers. This software can automate almost all the features of Twitter:
  • Increase its followers
  • Managing tweets
  • Generate tweets
  • Answer and / or thank
  • Do complex searches (places, people, etc.)
  • Automatically follow people and / or thematic
  • And much more...
All this in single software!

TweetAdder

Discover TweetAdder

Tweet Adder is Software that automatically generates your network of Twitter Followers, increases your visibility and all your marketing efforts with five major functions:
  • Auto follow
  • Automatic unfollow
  • Automatic Tweet
  • Automatic Message
  • Managing Twitter trends

How Does TweetAdder?

First download TweetAdder, install (PC, MAC Linux), configure your Twitter account and then decide what should be automated or not.

In just one month, gain followers is simply impressive and visibility appointment (see stats below).

TweetAdder 1

Video Tutorial 

Conclusion and Remarks

TweetAdder is a great tool for those who want to quickly increase their twitter followers and internet visibility. The ability to choose the theme, in particular twitter and many other options still slots make this the benchmark software.

Finally, note that TweetAdder is sold from $55 for a single license and for only $74 you can manage up to 5 different accounts twitters.

Saturday, November 2, 2013

Show your avatar with Gravatar

For his image / logo / avatar when commented on blogs

Show your avatar with Gravatar

Show Your Image in The Comments

On Gravatar, users can create a report based on their e-mail account and send an avatar to be associated with this account. A plug-in Gravatar is available on most engines known blog, when a visitor wishes to post a comment on a blog that requires an e-mail address, the server will query Gravatar on the existence of an avatar associated with this address. If this is the case, it will be place next to the comments posted. Gravatar is supported natively in WordPress since version 2.5, but also Drupal SPIP.

How to get your Gravatar?

Visit the Gravatar website, click on "Get your gravatar today", once validated your email ready!

You will be asked to adjust your image, choose a category (family, adult, etc...) To return any additional address. Therefore, any comments on blogs appear compatible with your Avatar / Gravatar.
Copyright @ 2013 Johnny Gagnon blog. Designed by Templateism | Love for The Globe Press