how to configure SEO smart links in wordpress website

For interlinking articles in wordpress, we need to install and configure SEO smart links in wordpress. Here we given steps and screenshot with their details. In following article we already written, why interlinking is important in any website.

Interlinking Articles on WordPress

how to configure SEO smart links in wordpress website

SEO Smart Links (https://wordpress.org/plugins/seo-automatic-links/)

how to configure SEO smart links in wordpress website
how to configure SEO smart links in wordpress website

SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.

SEO Smart Links provides automatic SEO benefits for your site in addition to custom keyword lists, nofollow and much more.

SEO Smart Links can automatically link keywords and phrases in your posts and comments with corresponding posts, pages, categories and tags on your blog.

Further SEO Smart links allows you to set up your own keywords and set of matching URLs. Finally SEO Smart links allows you to set nofollow attribute and open links in new window.

It is a perfect solution to get your blog posts interlinked or add affiliate links to other sites.

Everything happens completely transparent, and you can edit the options from the administration settings panel.

configure SEO smart links in wordpress

We have given the screen shot of each and every step. Using above screenshot, configure “Internal Links” section. Please Use setting as per shown in image.

Settings section

SEO-Smart-Links-setting-page2

Using above screenshot, configure “Setting” section. Please Use setting as per shown in image.

Limits section

SEO-Smart-Links-setting-page3

Using above screenshot, configure “Limits” section. Please Use setting as per shown in image.

Here is Video tutorial for configure SEO smart links in wordpress

SEO Smart Links – Premium Edition

SEO Smart Links is a very powerful plugin which suits both beginner users (with a plugin&play philosophy with optimal options pre-set) as well as those proficient in the art of SEO with numerous customizable features.

SEO Smart Links – Premium Edition enhances your search engine rankings by automatically inter-linking your posts either in automatic or in user-set mode. It also helps you manage your affiliate links and much more. Click to read the full list of features and buy here.

Our Review:

SEO smart link is really smart in terms of behaviour in wordpress webpages. It is quite fast as compared to other wordpress plugins which has used for interlinking. We experienced good amount of traffic increase and page view increases. The important part, It decreases the bounce rate.

turn off wordpress comment email notification

Many times we receive unwanted spam comments email notification from wordpress website. We personally faced comments email notification issue so many times. Many of our clients also faced this issue. WordPress itself given facility to turn off wordpress comment email notification using wordpress admin section. WordPress by default enable the all email types of notification on.

turn off wordpress comment email notification

In this article, We will show you, how to turn off wordpress comment email notification. Using wordpress administration you can switch off wordpress comments email.

Login to WordPress site dashboard. In left side menus,  go to Settings » Discussion. Then look at where it says “Email me whenever” and “Before comments appear” un-check the boxes there.

turn off wordpress comment email notification
turn off wordpress comment email notification

 

Please Use setting as we shown in above picture and save the settings. After this your email notification will be off. Using Other setting “Comments author must have a previously approved comment”. Uncheck that checkbox also. So previous commenter will never publish there comments without your approval.

Why turning off wordpress comment email notification is good?

WordPress send email notification through your server. Many times from sendmail server. If you are getting the huge amount of spam comments than, Your server will try to send email for every spam comment. It will use huge amount memory and server CPU. In that can first stop comment email notification.

Additional Comments setting

On Discussion Page we have “Comment Moderation” section. This setting about spam comments. In textbox you need to add words which you think could be spam related wrods than you can put those words there.

When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the moderation queue. One word or IP per line. It will match inside words, so “press” will match “WordPress”.

You should add some spam comments related words. We will write about “Comments Moderation” in next coming days.

how to disable disqus for custom post types in wordpress

Earlier we also used disqus comment system. But now we stopped using disqus. Disqus comment system is most powerful and popular third-party comments tool. this tool is really great. With disqus you don’t need to worry about spam comments. Some times we faced slowness with disqus comments system so we stopped using disqus comments system.

If you want to use disqus comment system then go to following URL and download from here

Disqus Comment System

Disqus, pronounced “discuss”, is a service and tool for web comments and discussions. Disqus makes commenting easier and more interactive, while connecting websites and commenters across a thriving discussion community. The Disqus for WordPress plugin seamlessly integrates using the Disqus API and by syncing with WordPress comments.

how to disable disqus for custom post types in wordpress

If you are creating premium theme. Or you are trying to create the wordpress theme for your client than you need to control everything through your theme control panel. Using following code you can easily control disqus comment system through your wordpress theme code.

how to disable disqus for custom post types in wordpress
how to disable disqus for custom post types in wordpress

We given step for disable disqus for custom post types in wordPress with code.

What you need is, just copy and paste following code in functions.php file (wordpress theme).  Use following code.

add_filter( 'comments_template' , 'wpb_block_disqus', 1 );
function wpb_block_disqus($file) {
if ( 'custom_post_type_name' == get_post_type() )
remove_filter('comments_template', 'dsq_comments_template');
return $file;
}

Note: do not forget to change the “custom_post_type_name” name as per your custom post name.
Above code will check for custom post type and if current post with given custom post name than disqus comments will be disabled. This is safe way to disable disqus comments for custom posts.

You can use the Appearance ->Editor option also. Open functions.php file in Editor and at end of file Just put above code.

Following are some Useful article related to wordpress comments:

how to install varnish with wordpress and apache

There are many caching solution available in open source. But Varnish is best in among. In this article, We given full steps to use and install varnish with wordpress and apache server . varnish setup with your wordpress site. Many website webmasters installed Varnish on their production servers to handle millions of requests without delay in response. There are many caching plugin like W3 Total Cache, WP Super Cache, Hyper Cache and so many..

Varnish is open source software

Varnish is free open source software licensed under a two-clause BSD licence aimed to really super boost server performance. In short, it will work as web accelerator between any server that speaks with HTTP (Apache or any other).

how to install varnish with wordpress and apache
how to install varnish with wordpress and apache

Why Apache or Nginx is Enough to Handle Huge Traffic
Many system administrator do many tricks with Apache because it performs really bad when the server is getting very high requests. Some people started using other servers like Ngnix and LiteSpeed. WordPress itself are using Ngnix server for many years for production environment. But still performance and response time of website is not that much fast with these plugins. So Best solution is Varnich Cache.

Varnish Explained Here

Vanish server started working on top of Apache server. When HTTP request comes to server first it will go the varnish server, If Vanish server has the response in memory cache then it will give response immediately, If Varnish server does not has cache for that request then it will go to apache server and get the response and keep in cache. Next request will delivered by Varinish cache, which will be so fast. Using varnish cache you can increase your server performance and response time by 300 to 900x. I personally checked response time difference. Before installing varnish cache my server response time was 3.46 second. After installing Varnish Cache, my server response time was 0.3, Means My server response increased by 1000x.

In following diagram, we explained, how varnish server process request.

varnish processing request compressed, how to install varnish with wordpress and apache
varnish processing request compressed, how to install varnish with wordpress and apache

Why install varnish with wordpress

  1. It will reduce server load , by reducing CPU work
  2. It will load your load your WordPress website very fast, because vanish cache stored in RAM.
  3. Your wordpress site SEO will increase, Because your site will load so fast
  4. Response time will reduce by 1000x
  5. Google page speed response score improves by at-least 20%

how to install varnish with wordpress and apache

Note: You can use this tutorial for setup varnish with any apache website. If you used HTML, ROR, JAVA, PHP for your website than you can set up varinish as we shown in this article. Here, we are assuming you already installed wordpress with apache server on linux server.

We are using dedicated Linux (centos) server for hosting our sites. So here we given steps can be applicable for Red Hat, Centos, Fedora, ubuntu server. But for ubuntu server you need use “apt-get install” instead of yum install.

So now Just follow my steps to install the varnish server. For latest version of Linux, you don’t need to install repository. But for older linux version you need to install the Varnish server repository. For that use following command to install varnish repository.

rpm -Uvh http://repo.varnish-cache.org/redhat/varnish-3.0/el5/noarch/varnish-release/varnish-release-3.0-1.noarch.rpm

Than you will be ready for install varnish server. Use following command for installing varnish server. You need to run following command as root. So first became root.

yum install varnish

Configure Varnish to work on port 80

usually Apache run on port 80 and your all sites will run on port 80. So as I told you earlier in this article. (check Varnish Explained section) Varnish work on top of apache server So you need to set up varnish on port 80. In CentOS, RedHat, Fedora, and Ubuntu server, Varnish configuration file located in “/etc/sysconfig/varnish”. You can edit file using vim or vi editor or you can download file to your PC and edit it then upload to server.

I am using vim here.


vim /etc/sysconfig/varnish

Please change files first part code as per I shown in image. OR you can download setting file from here:

[viral-lock message=”Download Link is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

https://github.com/purab/varnish/blob/master/varnish
 

[/viral-lock]

  • Change Default Varnish Config file

Got to “Alternative 2” section and change setting as I shown in image. Un-comment all the lines after “Alternative 2” as I shown.

By default -s setting will be pointed to filesystem, change that to memory. This is important, because we want, varnish give response from memory.

you need to change “-a : 6081 \” to “-a : 80 \” as we shown here in image. You can change “256m” to higher number, which is depends on your server configuration. If you have higher memory server then you can 512mb or 1GB for Varnish server. Many websites are using 4gb for varinsh servers. But they have a huge amount of traffic.

varnish configuration, install varnish with wordpress and apache
varnish configuration, install varnish with wordpress and apache

 Second Part of configuration – go to end of file, using “shit+g” key. Change configuration as per I shown.

Got to “Alternative 3” section and change setting as I shown in image. Comment all the lines after “Alternative 3”

varnish default config , install varnish with wordpress and apache
varnish default config , install varnish with wordpress and apache
  •  Change server config of Varnish

Like Apache server, Varnish server VCL file found in “/etc/varnish/default.vcl” location. Varnish VCL file is configuration for looking for apache(server) response data(content). You can edit this file using vim editor as per shown in following image OR you can download file from following location.

[viral-lock message=”Download Link is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

https://github.com/purab/varnish/blob/master/default.vcl
 

[/viral-lock]

 

varnish server config, install varnish with wordpress and apache
varnish server config, install varnish with wordpress and apache

Change the port 80 to 8080 port as We shown in image. Means Varnish server will generate cache from port 8080 so you need configure your apache server on port 8080.


backend default {
.host = "127.0.0.1";
.port = "8080";
}

Now Varnish configuration is complete. Now we need to configure apache server to send apache in back of varnish server.

You need to change following setting of your apache server. By default apache config file is htttpd.conf or apache.conf file. You will find this file in “/etc/httpd/conf/httpd.conf” location. For ubuntu that will be other location. Open your apache config file.

You can download apache configuration file from here. You can refer only “custom.conf” file. it has all changed configuration.

https://github.com/purab/varnish/blob/master/custom.conf
https://github.com/purab/varnish/blob/master/httpd.conf

We created custom.conf file and added under “/etc/httpd/conf.d/” folder. So that file will be automatically loaded in apache config.

You can add following code in your apache configuration file as we shown in following image. You need to change the NameVirtualHost 80 to 8080. So your apache server will run on port 8080.

apache server config with varnish,  install varnish with wordpress and apache
apache server config with varnish, install varnish with wordpress and apache

You need to change VirtualHost entries for each of your domain. This is very important, If you do not change this properly then your apache server will through error while restarting.


NameVirtualHost *:8080

#Browser cache code
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.[0678] no-gzip
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html
BrowserMatch \bOpera !no-gzip
Header append Vary User-Agent

#purabtech.in
<VirtualHost *:8080>
ServerAdmin purabdk@gmail.com
DocumentRoot /home/siwan/purabtech.in
ServerName purabtech.in
ServerAlias www.purabtech.in
ErrorLog logs/wordpressapi-error_log
CustomLog logs/wordpressapi-access_log common
</VirtualHost>

 

  •  Now your Varnish and Apache configuration are done. So time to restart both servers.

First Stop the Apache server and start the Varnish server. After starting Varnish server. Again start the apache server. You can use following commands step by step. Use commands in following order.


service httpd stop

service varnish start

service httpd start

Note: If you try to start varnish server without stopping apache server then it will never start because it will try to start using port 80.

  • Test Website performance and response time

How can you test your site pages speed and response time. Go to following “Google pagespeed” URL to test the website response time.

PageSpeed Insights 

Check Varnish service is running for your site. go to following URL and add your website URL in inputbox and select “service scan” checkbox and click on go button.

http://centralops.net/co/domaindossier.aspx

You will get response as shown in following image.

varnish-detection-response

As per explained in this article. After varnish configuration, your website will perform much faster then earlier and server CPU will not be consumed by apache server. We are using small dedicated server so we used only 256mb memory. If you have 1gb RAM of our server then use 256mb means one-fourth of memory for varnish server. When you have all code and database of same server.

Varnish Useful commands

# varnishlog : Provides detailed information on requests.
# varnishtop : It reads varnishd shared memory logs and presents a most commonly occurring log entries.
# varnishadm : Command-line varnish administration used to reload vcl and purge urls.
# varnishstat : Provides all the info you need to spot cache misses and errors.
# varnishhist : Provides a histogram view of cache hits/misses.

By “varnishstat” command you can check real-time statistics of varnish server. You can see following items

  • Client connection
  • Hit rate ration
  • Hit rate average
  • Number of client connections accepted

Following is screenshot of my production site. There are a lot of useful data provided by varnish stats

varnish varnishstat, install varnish with wordpress and apache
varnish varnishstat, install varnish with wordpress and apache

 

Create Varnish Log File

Using following command you can create varnish request log file as per apache log file. In this file you will get similar information like apache access log.


varnishncsa -c -a -d -w /var/log/varnish/varnish.log

For more varnish commands you can go to varnish site using following URL.

https://www.varnish-software.com/static/book/Getting_started.html#the-management-interface

Now you are set with varnish server and wordpress site. Above article can be used for any linux distribution like, Fedora, Ubuntu, Centos, RedHat and Suse. Commands will be same and configuration will be same.

In wordpress configuration you do not need to change anything. With Varnish server .htaccess file will not break because still main webserver is  apache.

If you still need assistance to install Varnish server and configure production server then contact to me.

how to add google analytics to wordpress footer

Google analytics became primary requirement of every websites. Google analytics provides every aspect of data with all type of user behavior and information. Where from user came to your site. How much time user spends on user website. which pages are most popular in your website.

Similarly wordpress is widely used for creating websites. So here in this article I will show you how to add google analytics in wordpress footer.

how to add google analytics to wordpress footer

Need google analytics account

First you need the google analytics account, If you don’t have than,  Go to the Google Analytics site and create a new account. There are many sites or check for YouTube video for getting the google analytics code from site.

Add Google Analytics script to Your WordPress Theme

Login to wordpress admin panel, Then goto “Appearance->editor” section. Then open footer.php file in editor. Before “” close tag put your google analytices code there. After adding analytics code save the file.

how to add google analytics to wordpress footer
how to add google analytics to wordpress footer

This is easiest step to add the google analytics to your wordpress theme.

There are many plugins which will give you facility to add google analytics to your wordpress site. Here we recommend you to use following wordpress plugin for adding the google analytics.

WP Google Analytics (https://wordpress.org/plugins/wp-google-analytics/)

how to add google analytics to wordpress footer
how to add google analytics to wordpress footer

WP Google Analytics makes it easy to track your site’s usage, with lots of helpful additional data.

Features:

  • Uses Google’s asynchronous tracking method which is faster and more reliable.
  • Automatically tracks site speed
  • Option to log outgoing links as events
  • Option to log 404 errors as events
  • Use custom variables in Google Analytics to track additional data on page views including:
    • Author
    • Categories
    • Tags
    • Context (such as home, category, post, author, etc)
    • Date
    • Logged in
    • Anything – Use the built-in filter to add your own!
  • Allows you to ignore any user roles (administrators, editors, authors, etc)

add feedburner subscribe popup to wordpress

Email subscription marketing is very becoming vary famous these days. There are many companies are focused on only email subscription and email campaigning.  Email campaigning is key focus point for many huge companies. Same with small firms and companies.

In this article I will show how to add free add feedburner subscribe popup to wordpress.

add feedburner subscribe popup to wordpress

Similarly wordpress is used by many big and small scale companies. Some blogger are also looking for free solution for email subscription. Using email subscription you can increase you site visitors so drastically.

Google feedburner is absolutely free email subscription server provided by Google itself. I found very useful free wordpess plugin which allow you to add popup in your wordpress website and force visitor to subscribe email with your website.

This plugin is very useful to you when you are running the corporate site or blog.

SC Popup Subscriber Form (https://wordpress.org/plugins/sc-popup-subscriber-form/)

jQuery Popup Feedburner Subscriber Form appears on Page Load.

You can 1. Enable/disable jQuery Popup Subscriber Form from admin panel 2. You can set the feedburner feed id from admin panel 3. You can change the Heading and Detail from Popup form from admin panel

Admin panel of Feedburner plugin

add feedburner subscribe popup to wordpress admin

Feedburner Pop in Action

add feedburner subscribe popup to wordpress
add feedburner subscribe popup to wordpress

We personally used this plugin for your sites. If you have knowledge of UI development then you can easily customize UI and look and feel of popup. Feedburner is free email subscription service so you don’t need to worry.

How regenerate thumbnails in wordpress website

Every wordpress theme has different thumbnail sizes. By default wordpress create multiple resized images. By default wordpress create four resized images. Means when we upload image, wordpress upload five images on server. Which is not necessary and unwanted. If your theme added, custom thumbnail sizes then it create more than five images and upload on server.

Why regenerate thumbnails in wordpress is important

Due to custom thumbnail sizes your server images data will always increase. So Whenever you use new wordpress theme, regenerate thumbnails in wordpress as per your theme UI. After changing wordpress theme. sometimes you don’t found old images for using as featured image or thumbnail. Because in new theme, default thumbnail size would be overridden through code. So regenerating thumbnail images is always important whenever you change the wordpress theme.

how regenerate thumbnails in wordpress

I found nice wordpress plugin which will delete unnecessary images from server and regenerate thumbnail images as per your theme requirement and design. This plugin will delete unwanted images from server or your site and save your disk space. This plugin is very great when you are using shared hosting or small server.

Force Regenerate Thumbnails (https://wordpress.org/plugins/force-regenerate-thumbnails/)

Admin panel of Force regenerate thumbnail plugin

regenerate thumbnails in wordpress
regenerate thumbnails in wordpress

regenerate thumbnails in wordpress. Delete and REALLY force the regenerate thumbnail.

Force Regenerate Thumbnails allows you to delete all old images size and REALLY regenerate the thumbnails for your image attachments.

I personally used force regenerate thumbnail plugin. Earlier on my server there are more than 4 thousand images were uploaded but I found more than 25 thousand images on server (in uploads folder). After using regenerating images there are only 12 thousand images were created by this plugin. I really found useful this plugin. it saved my disk space and deleted the unwanted images.

regenerate thumbnails in wordpress
regenerate thumbnails in wordpress

There are other plugins which regenerate the thumbnail but they never delete the unwanted images from server. Only bad thing about this plugin is, It does not optimize images with regeneration of plugin. I will write about optimizing uploaded images in next article.

Select default image size for gallery in wordpress

In wordpress image gallery, it uses the full image size by default for every gallery but you can select or set the another image size. Using following code you can set the default image size for your wordpress image gallery.

Select default image size for gallery in wordpress

just copy and paste following code to your functions.php file:

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php
 remove_shortcode('gallery');
 add_shortcode('gallery', 'custom_size_gallery');

 function custom_size_gallery($attr) {
      $attr['size'] = 'medium';
      return gallery_shortcode($attr);
 }
?>
default image size for gallery
default image size for gallery

how to remove unwanted image sizes from wordpress theme

Many times you do not need the many image sizes for wordpress. You need the original image only for your wordpress sites. Sometime you need the original and thumbanil image only. But many wordpress themes creates the multiple image version in your site which is not useful. Using following code you can remove the unwanted images while uploading the images.

Here in this article I going to show you, how we can remove unwanted image sizes from wordpress theme. Using code snippet, you can easily remove unwanted image sizes.

remove unwanted image sizes

You just need to add following code into functions.php file.

function wpapi_remove_image_size($sizes) {
                unset( $sizes['small'] );
                unset( $sizes['medium'] );
                unset( $sizes['large'] );
                return $sizes;
        }
add_filter('image_size_names_choose', 'wpapi_remove_image_size');
remove unwanted image sizes
remove unwanted image sizes