Easy Guide to Disable Automatic Updates in WordPress

disable Automatic Updates in WordPress

In this tutorial, we will learn how to disable automatic background updates in WordPress.

Configuring and Disabling Automatic WordPress Updates

The easiest way to do this is by installing and activating Disable Updates Manager plugin.

Go to Settings » Disable Updates Manager to configure your settings.

Disable Updates Manager

Alternatively, you can disable automatic updates in WordPress by adding this line of code in your wp-config.php file:

 define( 'WP_AUTO_UPDATE_CORE', false );

This will disable all automatic WordPress updates.

However if you want to receive minor core updates, but disable theme and plugin updates, then you can do so by adding the following filters in your theme’s functions.php file or in a site-specific plugin.

Disable automatic WordPress plugin updates:

 add_filter( 'auto_update_plugin', '__return_false' );

Disable automatic WordPress theme updates:

add_filter( 'auto_update_theme', '__return_false' );

Now that you know how to disable automatic updates in WordPress, the question is should you disable it?

On our sites, we have disabled automatic plugin and theme updates while keeping the minor core updates enabled.

We are listing the pros and cons of automatic updates below to help you make the decision that’s best for you.

Pros

You don’t have to worry about updating minor WordPress releases which are pushed out for maintenance and security purposes.

This is something that you only got if you paid for managed WordPress hosting, but now it’s available for everyone (at least for minor releases).

You also have the benefit of knowing that if there was a crucial security issue with WordPress or a popular plugin, then WordPress will automatically update even if you are on a vacation, so your site is secure.

Cons

There is a slight chance that automatic updates can break your site. In our experience, the minor releases haven’t broken any of our sites yet.

But that’s because we are following the best practices and not modifying any core files. If you modify WordPress core files, then these automatic updates can override them.

Although it hasn’t happened yet, but if WordPress ever felt necessary to push a security update for a theme you are using, then there is a chance that it will break your website specially if you have modified your theme files.

Similar to that, automatic plugin updates can break your site as well because there are just too many variables (different server environments, plugin combinations, etc).

Now it’s important to know that these updates will not break majority of websites, but considering WordPress powers millions of websites, a small percentage can still be a lot of sites.

The worst part about this update was that the core team did not communicate with site-owners. So there is a very good chance that some people haven’t even realized that their SEO is at risk because of a security update that possibly deactivated their main SEO plugin.

Conclusion

Normally when WordPress core updates, there is an announcement that follows with it.

However with the past two automatic plugin updates, we haven’t seen a blog post or an email from WordPress.

It would be nice to have the WordPress team send an email when they push out security updates to a plugin. Also there should be a way to notify the site owner if the update wasn’t successful, so they can fix the issues as soon as possible.

Easy Guide to Create a Wiki Knowledge Base Using WordPress

In this tutorial, we will learn how to create a wiki knowledge base in WordPress.

WordPress Wiki & Knowledge Base Plugin

Knowledge Base Plugin

If you want to add a wiki knowledge base to your existing WordPress site, then the easiest way to do it is by using a WordPress wiki knowledge base plugin. There are several plugins available, but we recommend Knowledge Base by PressApps.

All you have to do is install and activate the plugin. Once activated, it adds a Knowledge Base tab in your WordPress admin area.

Knowledge Base Admin

Knowledge Base is it’s own custom post type with categories and tags which allows you to organize your documentation.

The best part about this is that you can add it on your main site, and it will match your brand style / formatting for the most part. It also comes with public / member only voting system, custom widgets, drag-drop functionality, etc. The downside is that it costs $20.

In our next method, we will show you how you can accomplish all of this for free, but it does involve code.

WordPress Wiki & Knowledge Base Code Snippet

Another way to add a wiki knowledge base to your existing WordPress site or even create a dedicated wiki site is to use the code snippet method.

The downside is that you have to copy/paste a little bit of code which can be scary for beginners. The upside is that it gives you more freedom, and it’s completely free unlike the first two options.

We will do our best to give step by step instructions.

Note: Before you start, please create a complete backup of your WordPress site.

First thing you need to do is install and activate the Knowledgebase CPT plugin. This simple plugin creates a custom post type called knowledge_baseand a taxonomy called section.

This allows you to easily add your wiki articles and organize them into sections.

Adding knowledge base articles and sections

Once you have a few articles and sections, you would need to display them on your website. This is where you need to deal with a little bit of code.

Start by adding this code snippet into your theme’s functions.php file or a site-specific plugin.

function wpb_knowledgebase() {
// Get Knowledge Base Sections
$kb_sections = get_terms('section','orderby=name&hide_empty=0');
// For each knowledge base section
foreach ($kb_sections as $section) :
$return .= '

 

This code lists all the knowledge base articles under the section they were filed in.

Next all you need to do is create a new WordPress page and add [knowledgebase] shortcode inside it. Save your page and preview it.

Plain knowledge base section with no CSS

It looks very plain right now, but we can add some styling to it. You can use this CSS as starting point and then continue editing to match your own colors.

Paste the following code in your theme’s style.css file.

.kb_section {
float: left;
width: 280px;
max-width: 280px;
margin: 10px;
background-color: #f5f5f5;
border: 1px solid #eee;
}
h4.kb-section-name {
background-color: #eee;
margin: 0;
padding: 5px;
}
ul.kb-section-list {
list-style-type: none;
list-style: none;
display: inline;
}   
li.kb-section-name {
list-style-type: none;
display: inline;
}
ul.kb-article-list {
list-style-type: none;
list-style: none;
}   
li.kb-article-name {
list-style-type: none;
}
div.kb_section:nth-of-type(3n+1) {clear:left;}
div.kb_section:nth-of-type(3n+3) {}

This how it looked on our demo site where we are using Twenty Twelve theme.

Styled knowledge base page in WordPress

By default, your sections will be displayed in alphabetical order. However if you want to change the order of sections, then you can do that by installing Custom Taxonomy Order NE plugin. This will allow you to drag-drop your sections in the right order.

Easy Guide to Optimize Your WordPress Robots.txt for SEO

In this tutorial, we will show you how to optimize your WordPress robots.txt for SEO and help you understand the importance of robots.txt file.

Why you Need a Robots.txt File?

Absence of a robots.txt file will not stop search engines from crawling and indexing your website. However, it is highly recommended that you create one. If you want to submit your site’s XML sitemap to search engines, then this is where search engines will look for your XML sitemap unless you have specified it in Google Webmaster Tools.

We highly recommend that if you do not have a robots.txt file on your site, then you immediately create one.

Create a Robots.txt file

Robots.txt file usually resides in your site’s root folder. You will need to connect to your site using an FTP client or by using cPanel file manager to view it.

It is just like any ordinary text file, and you can open it with a plain text editor like Notepad.

If you do not have a robots.txt file in your site’s root directory, then you can always create one. All you need to do is create a new text file on your computer and save it as robots.txt. Next, simply upload it to your site’s root folder.

Use Robots.txt file

The format for robots.txt file is actually quite simple. The first line usually names a user agent. The user agent is actually the name of the search bot you are trying to communicate with. For example, Googlebot or Bingbot. You can use asterisk * to instruct all bots.

The next line follows with Allow or Disallow instructions for search engines, so they know which parts you want them to index, and which ones you don’t want indexed.

See a sample robots.txt file:

User-Agent: *
Allow: /wp-content/uploads/
Disallow: /wp-content/plugins/
Disallow: /readme.html

In this sample robots.txt file for WordPress, we have instructed all bots to index our image upload directory.

In the next two lines we have disallowed them to index our WordPress plugins directory and the readme.html file.

Optimizing Your Robots.txt File for SEO

In the guidelines for webmasters, Google advises webmasters to not use robots.txt file to hide low quality content. If you were thinking about using robots.txt file to stop Google from indexing your category, date, and other archive pages, then that may not be a wise choice.

Remember, the purpose of robots.txt is to instruct bots what to do with the content they crawl on your site. It does not stop bots from crawling your website.

There are other WordPress plugins which allow you to add meta tags like nofollow and noindex in your archive pages. WordPress SEO plugin also allows you to do this. We are not saying that you should have your archive pages deindexed, but if you wanted to do it, then that’s the proper way of doing it.

The proper way of adding noindex to archive pages in WordPress

You do not need to add your WordPress login page, admin directory, or registration page to robots.txt because login and registration pages have noindex tag added as meta tag by WordPress.

It is recommend that you disallow readme.html file in your robots.txt file. This readme file can be used by someone who is trying to figure out which version of WordPress you are using. If this was an individual, then they can easily access the file by simply browsing to it.

On the other hand if someone is running a malicious query to locate WordPress sites using a specific version, then this disallow tag can protect you from those mass attacks.

You can also disallow your WordPress plugin directory. This will strengthen your site’s security if someone is looking for a specific vulnerable plugin to exploit for a mass attack.

Adding Your XML Sitemap to Robots.txt File

If you are using Yoast’s WordPress SEO plugin or some other plugin to generate your XML sitemap, then your plugin will try to automatically add your sitemap related lines into robots.txt file.

However if it fails, then your plugin will show you the link to your XML Sitemaps which you can add to your robots.txt file manually like this:

Sitemap: http://www.yourdomain.com/post-sitemap.xml
Sitemap: http://www.yourdomain.com/page-sitemap.xml

What Does an Ideal Robots.txt File Should Look Like?

Honestly, many popular blogs use very simple robots.txt files. Their contents vary, depending on the needs of the specific site:

User-agent: *
Disallow:
 
Sitemap: http://www.yourdomain.com/post-sitemap.xml
Sitemap: http://www.yourdomain.com/page-sitemap.xml

This robots.txt file simply tells all bots to index all content and provides the links to site’s XML sitemaps.

User-Agent: *
Allow: /?display=wide
Allow: /wp-content/uploads/
Disallow: /wp-content/plugins/
Disallow: /readme.html
Disallow: /refer/
 
Sitemap: http://www.yourdomain.com/post-sitemap.xml
Sitemap: http://www.yourdomain.com/page-sitemap.xml
Sitemap: http://www.yourdomain.com/deals-sitemap.xml
Sitemap: http://www.yourdomain.com/hosting-sitemap.xml

By end of this tutorial now you know how to optimize your WordPress robots.txt file for SEO.

Easy Guide to Display the Latest Sticky Posts in WordPress

In this tutorial we will show you how to display the latest sticky posts in WordPress.

Latest Sticky Posts Demo

Note: This is an intermediate level tutorial and requires basic HTML / CSS knowledge + WordPress themes knowledge.

First thing you need to do is copy and paste this code snippet in your theme’s functions.php file or in a site-specific plugin.

function wpb_latest_sticky() { 
 
/* Get all sticky posts */
$sticky = get_option( 'sticky_posts' );
 
/* Sort the stickies with the newest ones at the top */
rsort( $sticky );
 
/* Get the 5 newest stickies (change 5 for a different number) */
$sticky = array_slice( $sticky, 0, 5 );
 
/* Query sticky posts */
$the_query = new WP_Query( array( 'post__in' => $sticky, 'ignore_sticky_posts' => 1 ) );
// The Loop
if ( $the_query->have_posts() ) {
    $return .= '

 

The code above queries the WordPress database to retrieve the 5 latest sticky posts. It then displays each sticky post’s title with a link in a list format. We have wrapped all that in a function and created a shortcode.

Now to display your latest sticky posts, you can use the shortcode [latest_stickies] in any WordPress post, page, or even a text widget.

If you would like to use shortcodes inside a text widget, then you will need to add this extra line of code in your theme’s functions.php or site-specific plugin.

 add_filter('widget_text', 'do_shortcode');

This snippet and function can very well be used in featured slider, or any other advanced feature that you would like to display on your site. This snippet is mostly geared toward a WordPress site that has a custom homepage or a magazine style look.

That’s all, we hope this tutorial helped you display latest sticky posts on your WordPress blog.

Easy Guide to Easily Create a Coupon Site in WordPress

In this tutorial, we will show you how to create a coupon site in WordPress without any code knowledge.

 

Before we start, we want to let you know that we built our deals section using custom post types and custom taxonomies. Since that requires code and is difficult for beginners, we’re going to show an easier way to build a coupon site that doesn’t require any HTML or CSS knowledge.

The first method we are going to cover will use a WordPress coupon theme that allows you to create a dedicated coupons site in WordPress. This will be similar to RetailMeNot and FatWallet.

The second method we are going to cover will use a WordPress coupon plugin that allows you to add a coupons section to an existing WordPress site similar to the WPCademy deals concept.

Let’s get started.

Creating a Coupon Site in WordPress

If your primary goal is to create a dedicated coupon site like RetailMeNot and monetize it with affiliate links, then using a WordPress coupon theme is the best solution for you.

We’re going to assume that you already have WordPress hosting and installed WordPress. If you haven’t, then you need to do that first.

We recommend SiteGround. They’re a user favorite and offer an exclusive 60% discount for WPCademy users. You also get a free domain too!

Once you have installed WordPress, you would need to install and activate the Clipper theme which is the best WordPress coupon theme.

It is a premium WordPress theme that costs $99 for a single site license and $159 for developer license.

Clipper coupons theme for WordPress

We usually don’t recommend installing themes to add functionality to your WordPress site, but we are making an exception in this case. Why? Because Clipper does an excellent job in handling the appearance as well as functionality to create a complete coupons site in less than an hour.

It comes with a custom write panel, advanced link cloaking and tracking feature, ability to allow users to submit coupons, advertising support to allow you to charge companies to post their coupons, custom email templates, dedicated store and category pages, subscription features, and basically everything you need to build a coupon site.

Once you have it installed, simply go to Coupons » Add New to add your first coupon.

You would need to provide a title for your coupon along with other details in the post editor. Once you are done entering coupon information, simply click on the publish button.

Clipper comes with multiple color choices, so you can make sure that your site looks the way you want. There are also some ready to use child themes for Clipper which you can buy from AppThemes website.

You can also Clipper to accept coupons submitted by registered users. Once a coupon is submitted to the site, you can review and publish it.

Share a coupon

You can also create dedicated stores and category pages to showcase coupons from specific stores or categories.

Clipper has basic stats for the coupons, and how each one of them is performing on your site. Registered users who are submitting coupons can see how their coupons are performing on your site.

User dashboard in Clipper WordPress theme for coupons

Overall, Clipper coupon theme is the best solution for building a dedicated coupon site in WordPress for affiliate marketers.

Adding a Coupons Section to an Existing WordPress Site

If you have an established WordPress site, then you may not want to change your theme. In that case, you will need to use a WordPress coupon plugin to add a coupons section to your existing site that matches your design.

First thing you need to do is install and activate the Coupon Creator plugin. Upon activation, simply go to Coupons » Add New to create your first coupon.

Creating coupon in Coupon Creator plugin

You can add coupon details, terms and condition, choose colors, and set an expiration date for your coupon. Once you are done, simply click the publish button to save your coupon.

Next, you can add the coupon into a post or page by using the Add Coupon button above the post editor.

Adding coupons into WordPress posts

You can also add coupons using the shortcodes. You can see all your coupons and their shortcodes listed on the coupons page in your admin area.

Coupon shortcodes to use in your WordPress posts and pages

If you want to create a dedicated coupons section on your site, then create a new WordPress page and click on the Add Coupon button.

This will bring up the shortcode generator where you need to select Coupon Loop in the dropdown. You can also select the coupon category and align option. Once you are done, click the Insert Coupon button and Publish the page.

Display all coupons on a page

That’s all, we hope that this tutorial helped you create a WordPress coupon website.

Easy Guide to Create Invoices for Clients Using WordPress

In this tutorial, we will learn how to create invoices for clients using WordPress.

Use WP-Invoice WordPress Plugin

Another way to handle invoices is by using the WP-Invoice plugin. This way your WordPress website becomes the hub of your invoices and payments.

First thing you need to do is install and activate the WP-Invoice plugin. Upon activation, the plugin will add a new ‘Invoice’ menu item in your WordPress admin. You need to visit Invoice » Settings to configure the plugin.

Configuring WP-Invoice settings

First you need to enter your business name as you want it to appear on the invoices. Next, you need to select a page to display invoices. We recommend you to create a new WordPress page titled Invoices and select that page here. This page will be used to display your invoices.

WP-Invoices comes with multiple payment options (see our list of 5 PayPal alternatives for freelancers to collect payments in WordPress. You need to choose a default payment system from Stripe, 2CheckOut, PayPal, Credit Card, or Interkassa payment gateways. You can selectively enable or disable payment gateways and allow your users to choose their preferred payment method.

When you choose a payment method, you will notice a new tab under the settings to configure that particular payment gateway. Each payment gateway has different settings which you will need to configure by logging into your account on that gateway and getting your API keys.

configuring payment gateways for your invoices

After configuring your payment gateways, click on Save All Settings button to store your changes.

Creating a New Invoice

To create and send a new invoice to a client, simply go to Invoices » Add New. You will be asked to provide client’s email address.

Enter the email address of your client

After entering the email address, the plugin will load the Invoice Editor screen. You will notice different meta boxes on the edit screen along with the familiar Title and Post Editor boxes. Just below the post editor box, you will notice a metabox to add the items you are including in this invoice.

Adding items to your invoice

Simply enter an item, quantity and price. The plugin will calculate the total amount and will display it as balance. You can click on the toggle description link to add description for an item in the list. You can also click on the ‘Add Discount’ button to deduct discounted amount based on percentage or a fixed amount.

Below the invoice items box, you will notice the payments gateway box. This will be showing your default payment and all the payment methods you have enabled on your site. You can change these settings for an invoice if you want, or you can leave it to use the default options you set in the plugin settings.

Setting payment options for a single invoice

On your right hand, you will see the user information metabox. It will be showing the client’s email address. You can fill in rest of the information. In case you don’t have all the information, you can leave it blank and the client can fill it in when making the payment.

In the publish metabox, there are options to publish this invoice as a quote, allow partial payments, or make it a recurring bill. Clicking on the Toggle Advance link will allow you to add a due date for the invoice and enter tax information.

Publishing your invoice

After publishing the invoice, your clients will receive an email notification with a link to the invoice page on your WordPress site. If your clients are not getting email notifications, then you should take a look at our guide on how to fix WordPress not sending email issue. The will see the invoice, with a link to print out the PDF version before making the payment. Clients can also change their personal information on the page.

Clients will be able to view the invoice on your site

Viewing Invoices and Reports

All the invoices you create can be accessed from Invoices » View All. You can sort and filter your invoices using the menu on your right hand side.

To get a bird’s eye view of your earnings and invoices, you need to visit Invoices » Reports. There you will be able to see graphs and charts for all invoices.

Fine Tuning Your Invoices  and Payments

The settings page for invoices will change after you save your initial settings. Now if you visit Invoices » Settings, you will be able to see many other options that you can configure. For example, you can tweak the email templates, create multiple templates, add line items which allows you to quickly add items into an invoice. You can even import/export your invoice data into XML file.

Advanced options for your WordPress Invoice system

Pros and Cons of WP-Invoice

Using WP-Invoice, you get a free plugin that fits right into your website. You don’t need to rely on a third party service to manage your clients and payments. You can setup automatic WordPress backups on a cloud storage to make sure that your data is safe.

That’s all, we hope this tutorial helped you create invoices for clients using WordPress.

Easy Guide to Clone a WordPress Site in 7 Easy Steps

In this tutorial, we will learn how to clone a WordPress site in 7 easy steps.

What Is Cloning, and Why Use It?

The idea behind cloning a WordPress site is simple: you make an exact copy or duplicate of one WordPress site and apply it to another site.

One practical scenario is when you are moving a WordPress site to a new web host or a new domain name. Cloning a site will save you hours of work.

Another possible use is when you are developing a site for a client. Once the project is done you can clone the WordPress site to the client site.

Lastly, you can clone a live WordPress site to your local server for testing and development purposes.

Cloning a WordPress site is not that difficult at all, here is how you can do it with these simple steps.

Using BackupBuddy To Clone A WordPress Website

BackupBuddy

For this article, we will be using BackupBuddy plugin. BackupBuddy is a WordPress backup plugin which allows you to not only just backup your WordPress site, it also allows you to easily restore your site from a backup. We will show you how to use this site restoration tool to easily clone any WordPress site.

1. Installing and Setting up BackupBuddy

First thing you need to install and activate the BackupBuddy plugin. Upon activation, the plugin will add a new menu item labeled ‘BackupBuddy’ in your WordPress admin bar. Clicking on it will take you to BackupBuddy setup wizard.

BackupBuddy Setup Wizard

The setup wizard is very straight forward. First you need to provide an email address. After that you need to enter a password.

This password will be used when you restore your site. The next option is to choose a location where you want to store your WordPress backups. The last option allows you to set up automatic backups.

BackupBuddy allows you to store your backups on cloud services like Stash, Amazon, Rackspace, and Dropbox. You can also store your backups on your own server or email them to yourself.

Once you are done with the setup wizard, click on save settings button to continue.

2. Backup Your WordPress Site

BackupBuddy will automatically initiate the backup process when you finish the setup wizard. Upon completion it will show you the option to download your backup or send the backup to a remote destination.

Backup process initiated and completed

You can always create a fresh backup by visiting the BackupBuddy » Backup page.

Creating new backups in BackupBuddy

3. Preparing To Clone Your WordPress Site

BackupBuddy provides a very easy site cloning / migration tool. Simply visit the BackupBuddy » Restore/Migrate page to begin the cloning process.

First you need to download the importbuddy.php file to your computer.

Download importbuddy.php file to your computer

After that, you need to download the backup zip file from your existing backups shown on the same page.

Download the backup zip file to your computer

4. Upload Backup and Importbuddy to New Location

Now that you have a complete backup of your site in a zip format and your importbuddy.php file, the next step is to upload them to the new location.

This new location can be a live website, or a site on your local server. If it is a site on your local server, then you just need to copy and paste the files into a subfolder inside your htdocs or www folder, like this:

C:\wamp\www\mynewsite\

If it is a live site, then you need to upload these files to the root directory using an FTP client.

No matter where you are copying the files, you need to make sure that the folder is completely empty and has no other files or folders inside it except importbuddy.php file and your backup zip file.

5. Running The Import Script

After uploading both files, you need to visit the importbuddy.php file in a web browser. It will be located at a URL like this:

http://www.example.com/importbuddy.php

Replace example.com with your own domain name.

Importbuddy password

You will be asked to enter your importbuddy password. This the password you created during step 1 or the password you entered when downloading importbuddy file during step 3.

After entering your password, you will notice that importbuddy has already found your backup zip file. Simply click on the Next Step button to continue.

Backup found and selected

Importbuddy will now extract your backup file when it is done, you need to click on the next button.

You will now reach the URL and database settings section.

Database and URL settings section

Importbuddy will automatically guess your new URL. It will also show your previous URL. Below that, you need to enter the new database settings. Enter the new database name, database username and password.

If you have not created a new database yet, then you can always login to your hosting account and create a database using cPanel. If you are moving the site to local server then you can create a new database using phpmyAdmin.

After entering your database information, click on the test database settings button. If you entered all information correctly, then you will see test results like this:

Test database settings

Click on the next step button to continue. Importbuddy will now import your WordPress database and show you the success message. After that you can click on the next step button.

Importbuddy will run some tests and show your new cloned site’s URL to verify that everything is working fine.

6. Test Your Cloned Site

Test your new site by visiting the link shown on the last step of importbuddy process. Check that your single posts links are working fine. Visit the WordPress admin area to see if you can perform all administration tasks.

If you run into any issues check out our guide on how to fix common WordPress errors.

7. Delete Temporary Files

On the import buddy screen, click on the cleanup and remove temporary files button. This will delete import buddy and all temporary files it created during the cloning process.

That’s all, you have successfully cloned your WordPress site.