Tag Archives: How to

How to Disable Trackbacks and Pings on Existing WordPress Posts

Do you want to disable trackbacks and pings on your old WordPress posts? Trackbacks and pingbacks allow blogs to notify each other that they have linked to a post. However, today it is mainly used by spammers to send trackbacks from spam websites. In this article, we will show you how to disable trackbacks and pings on existing WordPress posts.

How to Disable Trackbacks and Pings on Existing WordPress Posts

Why Disable Trackbacks and Pings in WordPress?

In the early days of blogging, trackbacks and pingbacks were introduced as a way for blogs to notify each other about links.

Let’s suppose you write an article and add a link to a post on your friend’s blog. Your blog will then automatically send a ping to their blog.

This pingback will then appear in their blog’s comment moderation queue with a link to your website.

However, today this feature is mostly used by spammers to send thousands of fake trackbacks and pings. Even if you are using Akismet, some of these trackbacks may still get into your moderation queue.

WordPress allows you to turn off this feature. You can do that by going toSettings » Discussion page and then uncheck the box next to ‘Allow link notifications from other blogs (pingbacks and trackbacks) on new articles’option.

Disable pings on all new articles

However, it only turns them off on any new articles that you publish. All your old posts will still have trackbacks and pingbacks enabled. WordPress will even add trackbacks to those posts whenever you link them on your own blog. See our guide on how to disable self pingbacks in WordPress.

Let’s take a look at how to easily disable trackbacks and pings on existing WordPress posts.

Disable Trackbacks and Pings for WordPress Posts

First you need to visit Posts » All Posts page and then click on the Screen Options button at the top right corner of the screen.

Show more posts per page

Now enter 999 next to ‘Number of items per page’ option and then click on apply button.

This will reload the post’s list, and it will now show upto 999 posts on the same page.

Next, you need to select all posts by checking the box next to title label.

Select all posts on the page

After that you need to select ‘Edit’ from Bulk Actions drop down and click on the ‘Apply’ button.

Bulk edit all selected posts

WordPress will now show you a bulk edit box with all posts on the page selected.

In the bulk edit box, you need to look for the pings option and then change it to ‘Do not allow’.

Do not allow pings

Next, you just need to click on the update button to save your changes.

WordPress will now update and turn off pings on all selected posts.

If you have more than 999 posts on your WordPress site, then you need to go to the next page and repeat the process.

We hope this article helped you learn how to easily disable trackbacks and pings on existing WordPress posts.

Advertisements

How to Add Signature or Ads after Post Content in WordPress

Do you want to add a signature or advertisement after your blog post content in WordPress? By default, WordPress does not come with an easy way to display signature or ads after post content. In this article, we will show you how to easily add signature ads after post content in WordPress.

Method 1: Display Ads After Post Content Using Plugin

First thing you need to do is install and activate the Insert Post Ads plugin.

Upon activation you need to visit Post Adverts » Settings page to configure plugin settings.

On the settings page, you need to select where you want to enable post ads. You can enable it for posts, pages, and custom post types.

Don’t forget to click on the save settings button to store your changes.

Next, you need to go to Post Adverts » Add New to create your signature or advertisement.

Simply provide a title for this particular signature or
after post ad. In the box below, paste your ad code, signature, or any HTML or text you want to display.

Next, you need to select ‘After content’ next to ‘Display the advert’ option. You also need to enter 1 in the field next to it.

Don’t forget to click on the publish button to make your ad available on your website. That’s all, your after post ad or signature is now live on your website. You can visit a post or page on your site to see it in action.

Method 2: Manually Add Signature Ads After Post Content

This method requires you to add code to your WordPress files. If you haven’t done this before, then please take a look at our beginner’s guide on adding code in WordPress.

First you need to add this code to your theme’s functions.php file or a site-specific plugin.

/ / A d d s i g n a t u r e o r a d a f t e r p o s t c o n t e n t f u n c t i o n wp b _ a f t e r _ p o s t _ c o n t e n t ( $ c o n t e n t ) { i f ( i s _ s i n g l e ( ) ) { $ c o n t e n t . = ‘ Y o u r s i g n a t u r e o r a d c o d e g o e s h e r e ‘ ;$ c o n t e n t . = ‘ Y o u r s i g n a t u r e o r a d c o d e g o e s h e r e ‘ ; } r e t u r n $ c o n t e n t ; } a d d _ f i l t e r ( ” t h e _ c o n t e n t ” , ” c u s t om _ c o n t e n t _ a f t e r _ p o s t ” ) ;

Don’t forget to replace the value of $content with your ad code, image, or signature you want to display.

You can now visit your website to see your signature ad in action.

We hope this article helped you add signature and ads after post content in WordPress.

How to Remove the Welcome Panel in WordPress Dashboard

Do you want to remove the welcome panel in your WordPress dashboard? The welcome panel is a box added to the dashboard page of your WordPress admin area. It contains shortcuts to perform different tasks and helps new users find their way around. In this article, we will show you how to remove the welcome panel in WordPress dashboard.

Why Remove Welcome Panel in WordPress?

Welcome panel is a meta box added to the dashboard screen of WordPress admin area. It shows shortcuts to different sections of your WordPress site.

The purpose of the welcome panel is to help beginners find their way around WordPress.

However as you become more familiar to all these locations, this panel will become less useful for you.

Having it on the screen, pushes down other important dashboard widgets and make them less noticeable.

Let’s see how you can easily get rid of the welcome panel from your WordPress dashboard screen.

Removing Welcome Panel from WordPress Dashboard

There are multiple ways to hide and even
completely remove the welcome panel.

The easiest way to remove it is by simply clicking
on the Dismiss button at the top right corner of the panel.

You can also remove the welcome panel by clicking on the Screen Options button at the top right corner of the screen.

This will bring a fly down menu. You need to uncheck the checkbox next to ‘Welcome’ option.

Both methods mentioned above will hide the welcome panel. You can access it again by clicking on the Screen Options button and checking the box next to Welcome option.

However if you want to completely remove the welcome panel even from the Screen Options, then that’s also possible.

This method requires you to add code to your
WordPress site.

You will need to add this code to your theme’s functions.php file or a site-pecific plugin.

r emo v e _ a c t i o n ( ‘ we l c ome _ p a n e l ‘ , ‘ wp _ we l c ome _ p a n e l ‘ ) ;

This code simply removes the action that adds the welcome panel to the admin dashboard.

You can now visit the dashboard screen and click on the Screen Options menu. You will notice that the welcome panel option will no longer be
available.

That’s all. We hope this article helped you remove the welcome panel in WordPress dashboard.

How to Improve WordPress Email Deliverability with SendGrid

Do you want to improve email deliverability from your WordPress site? Often web hosting providers don’t have properly configured mail settings, which blocks WordPress from sending emails. In this article, we will show you how to improve WordPress email deliverability with SendGrid.

The Problem with Emails in WordPress

By default, WordPress uses the PHP mail function to send out emails. Many WordPress hosting providers do not have this function configured properly. Some even block it to make sure that their servers aren’t used to send spam.

This becomes problematic for site owners because their WordPress site fails to send some or all emails.

WordPress emails are crucial for resetting passwords, sending notification emails, running an online store, getting contact form notifications, and more. If WordPress can’t send emails, you could get locked out of your site or lose customers by missing out on important notifications.

Having said that, let’s take a look at how to improve WordPress email deliverability with SendGrid (for free).

What is SendGrid?

SendGrid is an email service provider. They offer highly optimized email servers that you can use to send out your emails.

They offer both transactional email service (one-to-one emails like WordPress notices, order receipts, password resets, etc.) and email marketing services. Like all good email service providers, SendGrid spends significant resources to improve deliverability. This ensures that your WordPress emails land in your users’ inboxes, instead of being marked as spam. This is why companies like Uber, Spotify, Airbnb, Yelp, and thousands of others use SendGrid.

Sending WordPress Emails Using SendGrid

To set up SendGrid to work with your WordPress site, first you’ll need to visit the SendGrid website and sign up for an account. SendGrid is a paid service, but they also offer a free plan which allows you to send up to 12,000 emails each month.

That’s plenty for most small to medium-sized websites.

As your site grows, you can upgrade to their paid plan. It starts at $9.90 per month for up to 40,000 emails.

You can scale your pricing based on how many emails you need to send every month, but in our experience the free plan is sufficient for most folks.

Next, you need to install and activate the SendGrid WordPress plugin.

Upon activation, visit Settings » SendGrid to configure the plugin.

The plugin allows you to connect your WordPress site to SendGrid. You can do that by adding an API key or by using your SendGrid username or password.

We recommend using the API key method because it’s more secure. We will only cover the API method in this tutorial.

Start by visiting your SendGrid account dashboard and then click on Settings » API Keys

Next, you need to choose how to send mail. You can send it using the SendGrid API, or with SMTP.

The SMTP method requires Swift Mailer support. You can add it by installing and activating the Swift Mailer plugin on your WordPress site.

But you don’t need that. We recommend using the API method, since it’s easier to set up and more secure.

Go back to the Settings » SendGrid page in your WordPress dashboard. Under the Mail Settings heading, you’ll need to provide the sender name, email address, and reply-to address.

The name can be your website name, and the sending address can be your professional email address.

In other optional settings, you can choose to use email templates from SendGrid website and add their template ID in plugin settings. You can also create and use categories for emails you send through WordPress.

Don’t forget to click on the Save Changes button to store your settings.

That’s all! SendGrid will now replace the default WordPress mail function with SendGrid API, providing more reliable email service.

You can test it by performing any action that generates an email notification from WordPress. For example, you could reset your password, add a new user, or fill out your contact form.

We hope this article helped you improve your WordPress email deliverability with SendGrid.

How to Move WordPress to a New Host or Server With No Downtime

Are you looking to move your WordPress site to a new host or different server? The biggest risk when migrating a website to a new server is data loss and potential downtime. In this step by step guide, we will show you how to properly migrate your WordPress site to a new host with no downtime.

Migrate WordPress to New Server

Important: Before we start, we want to remind you that most WordPress hosting companies offer free migration services. If they don’t publicly state that, then all you have to do is ask. Usually it’s free, but some may charge a small fee.

Step 1: Choose Your New WordPress Host

If you’re stuck with a slow web host even after optimizing your WordPress site for speed, it’s time to move your WordPress site to a new host that can handle your growing traffic.

When looking for a new WordPress hosting provider, it’s important to choose carefully, so you don’t have to move again any time soon.

Here’s who we recommend:

  • For reliable shared hosting, we recommend going with Bluehost. They’re officially recommended by WordPress.org. And with our Bluehost coupon, WPBeginner users get 60% off and a free domain name.
  • If you’re looking for cloud hosting or location-specific providers, then we recommend you check out Siteground. They have data centers across 3 different continents.
  • If you’re looking for dedicated servers, then we recommend you check out InMotion Hosting. Their commercial class servers and support are amazing.

After buying your new hosting, do NOT install WordPress. We’ll do that in a later step. For now, your new web host account should be completely empty, with no files or folders in your main directory.

Step 2: Set Up Duplicator for Easy Migration

The first thing you need to do is install and activate the free Duplicator plugin on the website that you want to move.

Duplicator is a free plugin that we highly recommend. We’ve written in the past about how to use Duplicator to move your WordPress site to a new domain name without losing your SEO rankings.

However, in this article we will walk you through how to use it to migrate your WordPress site with zero downtime. The process is similar, but this guide will focus on moving your hosting, while the other guide focuses on switching to a new domain (such as from http://www.oldsite.com to http://www.newsite.com).

Once you have installed and activated Duplicator, go to the Duplicator » Packages section in your WordPress admin area.

Next, you need to click the Create New button in the top right corner.

Duplicator Packages

After that, click the Next button and follow the steps to create your package.

Create a copy of your website using Duplicator

Make sure that your scan results check out (everything should say “Good”), and then click the Build button. The process may take several minutes to complete, so leave the tab open as it works.

Duplicator scan results

Once the process is complete, you need to click on both the Installer and then the Archive buttons to download the package. You will need both files.

Download Duplicator package

The archive file is a copy of your site, and the installer file will automate the installation process for you.

Step 3: Import Your WordPress Site to Your New Host

Now that you have downloaded both the archive and installer files, the next step is to upload them to your new web host.

You can do this by connecting to your new web host using FTP. If you’ve never done this before, check out our beginner’s guide to uploading files via FTP to WordPress.

Note: When setting up your FTP client to connect to your new web host, keep in mind that your domain name still points to your old web host. That means you’ll need to enter the IP address of your new host instead of your domain. This is to ensure that these files go to the new host rather than the old host.

Using your FTP client, upload both installer.php file and your archive .zip file to the root directory of your website. This is usually /username/public_html/ or /username/public_html/example.com where example.com is your domain name.

If you’re not sure, just ask your web hosting company.

Make sure that your root directory is completely empty. If you have WordPress installed in your root directory, then you need to delete WordPress first.

Step 4: Change The Hosts File to Prevent Downtime

Once you’ve uploaded both files to your new host, you need to access the installer.php file in a browser.

The file can be accessed using a URL like this:

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

However, the problem is this URL will take you to your old web host, and you will get a 404 error. This is because your domain name is still pointing to your old web host.

Normally, folks will tell you to change your domain nameservers and point to your new host. However, that will result in your users seeing a broken website as you migrate it.

We’ll show you how you can access your new site temporarily on your computer, without affecting your old site.

This is done with a hosts file on your computer.

The hosts file maps domain names to specific IP addresses. In this step, we will show you how to add an entry for your domain name in the hosts file so that it points to your new host, but only when using your computer.

Making these changes will allow you to access the files on your new host using your own domain name, while the rest of the world will still be accessing your site from the old host. This ensures 100% uptime.

The first thing you need to do is find the IP address of your new web hosting server. To find this, you need to log into your cPanel dashboard and click on expand stats link in the left-hand sidebar. This will expand the sidebar showing you information about the status of your server. The information you need to copy is the Shared IP Address.

Finding your server's ip address in cPanel

In the next step, Windows users need to go to Programs » All Programs » Accessories, right click on Notepad and select Run as Administrator. A Windows UAC prompt will appear, and you need to click on Yes to launch Notepad with administrator privileges.

On the Notepad screen, go to File » Open and then go to C:\Windows\System32\drivers\etc. Select hosts file and open it.

Mac users will need to open the Terminal app and enter this command to edit hosts file:

sudo nano /private/etc/hosts

For both Windows and Mac users, at the bottom of the hosts file, you need to enter the IP address you copied and then enter your domain name. Like this:

192.168.1.22 http://www.example.com

Make sure that you replace the IP address with the one you copied from cPanel, and example.com with your own domain name. Save your changes, and you can now access your files on the new host using your domain name on your computer.

Important: Don’t forget to undo the changes you made to hosts file after you have finished the migration (step 5).

Step 5: Begin the Duplicator Migration Process

Now we’re ready to run the installer. Navigate to this address in your browser window, replacing example.com with your domain name:

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

If you have not already created a database on your new host, then it is time for you to create a database in cPanel. Be sure to make note of the database username and password.

Once you have created the database, you will need to enter the database information in the fields below and then click on the Test Connection button.

Test your database connection

If the installer fails to connect to your database, then check the values you entered above and make sure they are correct.

Once you have successfully connected to your database, scroll down to read the warnings and notices and check the box confirming you’ve read them. Then click the Run Deployment button.

Run deployment

The installer will now import your database. The process may take several minutes, so keep the tab open as it works.

In step 2 of the installer, you’ll be asked to verify your old and new URL paths. Make sure it’s accurate and click Run Update to update your URLs.

In the final step, you can complete the process and verify that everything is working correctly by clicking the buttons in order.

Duplicator installer final steps

Important: Now you can remove the changes you made to your hosts file in step 4.

Step 6: Update Your Domain

At this point, you’ve created a complete copy of your WordPress database and files on your new hosting server. But your domain still points to your old web hosting account.

To update your domain, you need to switch your DNS nameservers. This ensures that your users are taken to the new location of your website when they type your domain into their browsers.

If you registered your domain with your hosting provider, then it’s best to transfer the domain to the new host. If you used a domain registrar like Godaddy, Namecheap, etc, then you need to update your nameservers.

You will need the nameserver information from your new web host. This is usually a couple of URLs that look like this:

ns1.hostname.com
ns2.hostname.com

For the sake of this guide, we will be showing you how to change DNS nameservers with GoDaddy. Depending on your domain registrar or web host, the screenshots may not reflect the setup on your registrar or web host. However the basic concept is the same.

Just look for domain management area and then look for nameservers. If you need assistance with updating your nameservers, you can ask your web hosting company.

First you need to login to your Godaddy account and then click on the launch button next to domains.

Launch domains

On the next screen, click on your domain name. You will see your domain details, along with your nameservers. You need to click on the manage link under the nameservers.

Manage nameservers

On the next screen, you will see a link to enter custom nameservers. Clicking on the link will open a form where you can enter your custom DNS nameservers.

Entering nameservers

Save your changes and you’re done.

You have successfully changed the nameservers. DNS changes can take 4 – 48 hours to propagate for all users.

Now since you have the same content on your old host and the new host, your users wouldn’t see any difference. Your WordPress migration will be seamless with absolutely no downtime.

To be on the safe side, you can wait to cancel your old hosting account until 7 days after your migration.

We hope that this step by step guide helped you move WordPress to your new host with no downtime whatsoever.

How to Add Post Type Archive in WordPress Navigation Menus

Recently, one of our readers asked if it was possible to add a link to custom post type archive pages in WordPress navigation menus. An archive page in WordPress displays a list of all posts under a specific post type, category, or tag. In this article, we will show you how to add post type archive in WordPress navigation menus.

Custom Post Type Archives in WordPress

In WordPress, the term ‘Archives’ is used for a list of entries from a post type or taxonomy (like categories and tags).

If archives are enabled for a custom post type, then you can display them on your website. Typically, the URL of your custom post type archive page is in this format:

http://example.com/post-type-slug/

For example, we have a custom post type called‘Deals’, and you can view its archive page at a URL like this:

h t t p : / /www . wp b e g i n n e r . c om/ d e a l s /

You can place a link to the archive page of your custom post type in your site’s navigation menus. This will allow your users to see all past entries posted in that post type on a single page.

Having said that, let’s see how to add a link to your custom post type archive page in WordPress navigation menus.

Adding Link to Custom Post Type Archive page in Navigation Menus

First, you need to visit Appearance » Menus page. You will notice a tab for each of your custom post type in the left column.

You need to click on the name of your custom post type to expand it and then click on the ‘View all’ tab.

You will see an option for your post type archives. Check the box next to it and then click on the Add to Menu button.

Your custom post type archive will now appear as a menu item in the right column.

By default, it will use your custom post type name with the word archives for the link label.

You may want to change this into something easier. Click on the menu item to edit it and then change its navigation label.

Don’t forget to click on the save menu button to store your changes.

You can now visit your website to see the custom post type archive link in your navigation menu.

Just like posts and pages, you can also add a single entry from your post type to navigation menus.

Simply select an entry and then click on add to menu button.

Don’t forget to click on the save menu button to store your changes.

My Custom Post Type Doesn’t Appear on Menus Screen

Custom post types need to match some requirements in order to be displayed on Appearance » Menus page.

First you need to make sure that an archive page exists for your custom post type. Typically it is a URL like this:

h t t p : / / e x amp l e . c om/mo v i e s /

Replace example.com with your own domain name and movies with your post type.

If you can see entries from your post type on this page, then this means your post type supports archives but does not support other requirements.

Good news is that you can still add your custom post type archive page as a custom link.

Visit Appearance » Menus page and then click on the ‘Custom Link’ tab to expand it.

Enter the URL of your custom post type archive page in the URL field and add the label you want to display in the link field.

Next, click on the add to menu button, and you will notice the custom link appear in the right column.

You can now click on the save menu button to store your changes.

We hope this article helped you learn how to add post type archive in WordPress navigation menus.

How to Properly Setup Google AMP on Your WordPress Site

Do you want to setup Google AMP on your WordPress site? Accelerated mobile pages or AMP is a way to make your website load faster on mobile devices. Fast loading websites offer better user experience and can improve your traffic. In this article, we will show you how to set up Google AMP in WordPress.

What is Google AMP?

Google AMP stands for Accelerated Mobile Pages. It is an open source initiative supported by technology companies like Google and Twitter. The goal of the project is to make web content load faster for mobile users.

For many mobile users, reading on the web is often
slow. Most content rich pages take several seconds to load despite all efforts taken by site owners to speed up their website.

Accelerated Mobile Pages or AMP uses bare minimal HTML and limited Javascript. This allows the content to be hosted on Google AMP Cache. Google can then serve this cached version to users instantly when they click on your link in the search results.

It is very similar to Facebook Instant Articles . However, Instant Articles are limited only to Facebook’s platform, more specifically to their mobile app.

Accelerated Mobile Pages are platform-agnostic and can be used by any app, browser, or web viewer. Currently it is used by Google, Twitter, LinkedIn, Reddit, and others.

Pros and Cons of Google AMP (Accelerated Mobile Pages)

SEO experts claim that Accelerated Mobile Pages will help you rank higher in Google, and it improves the user experience for mobile users on slow internet connections. However, they are several challenges for website owners, bloggers, and marketers.

AMP uses limited set of HTML, JavaScript, and CSS. This means you cannot add certain widgets and features to your mobile AMP website. This limits your ability to add smart email optin forms, facebook like boxes, and other dynamic scripts.

While Google AMP supports Google Analytics , it does not support many other analytics platforms. Same goes for advertising options which are limited to select few advertising platforms.

Despite its limitations, Google is pushing AMP pages by giving them a boost in mobile search.

If significant chunk of your traffic comes from mobile searches, then you may benefit from adding AMP support to improve and maintain your SEO.

Note: There have been a few complaints about Google AMP by bloggers.

First is by Alex Kras who claim that you can potentially lose mobile traffic if you enable Google AMP. Read the article thoroughly because that’s a huge problem, and despite what the Google Tech Lead for AMP project has said, there aren’t any good solutions that address the issue in our opinion.

Second is by Terrence Eden which highlights the difficulties of switching back from Google AMP should you change your mind in the future. We don’t believe this is a major issue because you can do a 301 redirect which several have pointed out in the comment section of his blog posts, but nonetheless it is something you need to think about.

For the reasons above, we are not switching WPBeginner to Google AMP just yet.

However since several of our readers asked about how to setup Google AMP in WordPress, we have created a step by step process on how to setup Accelerated Mobile Pages in WordPress.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

Setting up Accelerated Mobile Pages or AMP in WordPress

First thing you need to do is install and activate the AMP plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you can head over to Appearance » AMP page to see how your site looks on mobile devices using AMP.

You can change the header background and text color on this page. The header background color you choose will also be used for links.

The plugin will also use your site’s icon or logo if your theme supports it.

Don’t forget to click on the save button to store your changes.

You can now visit any single post on your website and add / amp / at the end of the URL. Like this:

h t t p : / / e x amp l e . c om/ 2 0 1 6 / 1 0 /my – b l o g – p o s t / amp /

If you view the source code of the original post, you will find this line in the HTML:

This line tells search engines and other AMP consuming apps/services where to look for the AMP version of the page.

Troubleshooting:

If you see a 404 error when trying to view the amp version, then here is what you need to do.

Visit Settings » Permalinks page in your WordPress admin and click on the ‘Save Changes’ button. Remember, don’t change anything here, just press the save button. This will refresh your website’s permalink structure.

View Accelerated Mobile Pages in Google Search Console

Want to know how your Accelerated Mobile Pages are doing in Google Search? You can easily check this using the Google Search Console.

Log in to your Google Search Console dashboard and then click on Search Appearance » Accelerated Mobile Pages.

Don’t worry if you don’t see your AMP results right away. It may take a while for Google to index your Accelerated Mobile Pages and then show data in Search Console.

Extending and Customizing Your Accelerated Mobile Pages

The AMP plugin for WordPress comes with very limited customization options. However you can use some other WordPress plugins to add few more customizations. If you are already using Yoast SEO, then you need to install and activate the Glue for Yoast SEO & AMP .

It is an add-on plugin for Yoast SEO and AMP plugins. Upon activation, you need to visit SEO » AMP page to configure plugin settings.

The plugin allows you to enable AMP support for other post types. On the design tab, you can choose colors and design options. You can also upload a logo and a default header image which will be used when a post does not have its own featured image.

You can switch to the Analytics tab to add your Google Analytics ID. Don’t forget to click on the save settings button to store your changes. There are many more plugins which will allow you to add related posts, footer widgets, and even social media icons to your AMP pages.

However, you need to make sure to validate your AMP pages after you install any addon plugins.

We hope this article, helped you learn how to set up Accelerated Mobile Pages (AMP) on WordPress.

How to Hide a WordPress Page From Google

Recently, one of our readers asked if it was possible to hide a WordPress page from Google? Sometimes you may need to hide a page from Google to protect your privacy or to keep away unwanted users. In this article, we will show you how to hide a WordPress page from Google without affecting your site’s overall SEO.

Hiding a WordPress Post or Page From Google

Search engines like Google allow website owners to exclude content from search results. You can do this by using your site’s robots.txt file or using HTML meta tags.

We will show you how to do this in WordPress using two methods. You can choose the one that works best for you.

We will also show you how to password protect posts and pages in WordPress. If you don’t want to use the first two methods, then this approach will allow you to control the visibility of your posts and pages for all users.

Method 1: Hide a WordPress Page from Search Engines Using Yoast SEO

This method is easier and recommended for beginners.

First thing you need to do is install and activate the Yoast SEO plugin.

Next, you need to edit the post or page that you want to hide from search engines. Scroll down to the Yoast SEO meta box below the post editor and click on the advanced settings button.

The advanced settings section allows you to add meta tag robots to your blog posts or pages. Using the robots meta tag, you can tell search engines not to index or follow a page.

First you need to select ‘noindex’ from the drop down menu next to ‘Meta robots index’ option. After that, click on ‘nofollow’ next to ‘Meta robots follow’ option.

You can now save/publish your post or page.

Yoast SEO will now add this line of code to your post or page:

This line simply tells search engines not to follow or index this page.

Method 2: Hide a WordPress Page from Search Engines Using robots.txt File

This method requires you to edit the robots.txt file. Adding incorrect instructions in this file can have adverse affect on your site’s SEO, which is why it is not recommended for beginner users.

The robots.txt file is a configuration file that you can add to your WordPress site’s root directory. It allows a website to provide instructions for search engine bots, hence the name robots.txt.

. You can edit robots.txt file by connecting to your website using an FTP client or ‘File Manager’ in your WordPress hosting cPanel.

You will need to add these lines to your robots.txt file.

User-agent: *
Disallow: /your-page/

The user-agent line allows you to target specific bots. We are using asterisk sign to include all search engines.

The next line defines the part of the URL that comes after your domain name.

Now let’s assume that you want to hide a blog post with a URL like this:
https://siteprocessor.wordpress.com/2017/02/absheikh/

Here is how you will add this URL to your robots.txt file.

User-agent: *
Disallow: /2016/12/my-blog-post/

Don’t forget to save your changes and upload robots.txt file back to your server.

Disadvantages of Using robots.txt to Hide Content

First you need to keep in mind that robots.txt file is publicly accessible. Anyone can access it directly to see if there are any pages you are trying to hide.

While most search engines follow the instructions in robots.txt file, many other crawlers and bots may simply ignore it. These are the bots crawling the web to spread malware, target websites, or harvest information like email accounts, phone numbers, etc.

Method 3: Password Protect a Post or Page in WordPress

This method uses a different approach. Instead of asking search engines not to index a page, you can password protect it, so that it is only visible to users with the password.

WordPress comes with a built-in feature to password protect posts and pages. Simply edit the post or page that you want to protect.

Under the publish meta box, click on the ‘Edit’link next to ‘Visibility’ option.

This will show the visibility options available in
WordPress. You can keep a post/page public, make it private, or password protect it.

Private posts are only available to logged in users who have at least editor user role on your website.

Password protected posts can be seen by any visitor who has the password. Click on password protected option and then enter a strong password.

You can now publish or save your post/page.

Now visitors accessing the post or page on your website will be asked to enter the password to view the content.

That’s all, we hope this article helped you learn how to hide a WordPress page from Google.

a href=’http://c.jumia.io/?
a=24461&c=78&p=r&E=kkYNyk2M4sk’>

How to Disable PDF Thumbnail Previews in WordPress

Recently, one of our readers asked us how to disable PDF thumbnail previews in WordPress. Introduced in WordPress 4.7, this feature creates thumbnail images for all PDF files that you upload. In this article, we will show you how to easily disable PDF thumbnail previews in WordPress.

Why Disable PDF Thumbnail Previews in WordPress?

WordPress 4.7 started generating thumbnail previews of PDF files uploaded from WordPress media uploader.

This is a very useful feature for most WordPress sites.

However, some site owners may already be using PDF plugins that handle thumbnail previews and the overall display of the PDF downloads on their website.

If the new feature is conflicting with their existing PDF uploads, then they may want to disable PDF thumbnail previews in WordPress.

Having said that, let’s take a look at how to easily disable PDF thumbnail previews in WordPress 4.7 and later versions.

Disable PDF Thumbnail Previews in WordPress

This tutorial requires you to add a simple code snippet on your WordPress site.

You will need to add this code to your theme’s functions.php file or a site-specific plugin.

functionwpb_disable_pdf_previwes() {$fall back sizes=array();return$fall back sizes;}add_filter('fallback_intermediate_image_sizes', 'wpb_disable_pdf_previews');

Don’t forget to save your changes.

This code simply gives WordPress an empty array for PDF thumbnail sizes and stops WordPress from generating thumbnail previews.

You can now try uploading a PDF file to your WordPress site using the media uploader. You will notice that WordPress will not generate any thumbnail previews for your PDF file.

We hope this tutorial helped you learn how to disable PDF thumbnail previews in WordPress.

How to Fix Pluggable.php File Errors in WordPress

Are you seeing a pluggable.php file error on your WordPress site? Sometimes when you add a code snippet on your site or activate a new plugin, you may get the pluggable.php file error. In this article, we will show you how to fix pluggable.php file errors in WordPress.

When and Why You See Pluggable.php Errors?

WordPress allow users and plugins to override certain core functions. These functions are located in the pluggable.php file.

If a WordPress plugin or a custom code snippet fails to correctly handle one of these functions, then you will see an error like this one:


Warning: Cannot modify header information – headers already sent by (output started at /home/username/demosite/wp-content/themes/mytheme/functions.php:1035) in /home/username/demosite/wp-includes/pluggable.phpon line 1179


Sometimes you may be able to continue working on your site with this or some other error still appearing in the admin area.

Having said that, let’s take a look at how to easily fix pluggable.php file error in WordPress.

Fixing Pluggable.php File Errors in WordPress

The pluggable.php file is a core WordPress file. It’s never a good idea to edit the core WordPress file as your first option, even when there is an error pointing to them.

Most likely than not, the error is coming from a different location.

In order to fix any error mentioning pluggable.php file, just look at the first location mentioned in the error.


Warning: Cannot modify header information – headers already sent by (output started at /home/username/demosite/wp-content/themes/mytheme/functions.php:1035) in /home/username/demosite/wp-includes/pluggable.php


In the above example, the error is located in the theme’s functions.php file at line 1035.

This means you need to edit your theme’s functions.php file and change or remove the code causing this error.

Sometimes the headers already sent error is caused by an extra space after closing the php ?> tag, so you can just remove that, and it will fix the issue.

Let’s take a look at another example:


Warning: Cannot modify header information – headers already sent by (output started at /home/username/demosite/wp-content/plugins/some-
plugin-name/some-plugin.php:144) in /home/username/demosite/wp-includes/pluggable.php on line 1090

This error message is pointing to a plugin on your WordPress site causing the error. You can simply deactivate the plugin and notify the plugin author about the error.

In almost all cases, errors mentioning pluggable.php file are not caused by the file itself.

These errors are usually caused by a custom code snippet you added to functions.php file, or a poorly coded plugin, or even your WordPress theme.

Simply removing or editing the code or deactivating the plugin will make the error go away.

We hope this article helped you resolve pluggable.php file errors in WordPress.