Showing posts with label WordPress. Show all posts
Showing posts with label WordPress. Show all posts

Thursday, June 13, 2019

Google Search Consile Error - Submitted URL marked ‘noindex’

google-search-console-submitted-url-noindex-validate-fix-email-from

Sitemaps are important from SEO perspective. If you have installed the WordPress plugin Google XML Sitemaps, and you have submitted a link to Google via the Google Search Console, you might receive an email from "Google Search Console Team " saying that "your site is affected by 1 new Coverage related issue - Submitted URL marked ‘noindex’". Here is how to resolve it.
Read more »

Tuesday, June 4, 2019

How to disable, limit and delete WordPress post revisions?

how-to-disable-limit-delete-wordpress-post-revisions

If you are familiar with WordPress CMS, you might have observed that WordPress autsaves every edit by default. Post revisions is a good feature in WordPress to review and track changes. However, for some it may not be necessary as it is not required or due to database size concerns.

In this post, we shall see how to disable WordPress post revisions, set WordPress post revision to a certain number, deleted previous WordPress post revisions. 

So, I have a WordPress website too and I saw that the revision of a particular post is 229 already! I am not sure if there is a limit in WordPress up to how many latest revisions are saved. I guess there is none by default. It would be awesome if there is a setting for admins to set the revisions in WordPress.

wordpress-post-revisions-1


Anyway, I decided I do not need that many post revisions in my database. I also do not want to disable post revisions completely. You may want to completely disable revisions as per your need. Follow the steps below as per you need.

1) Disable WordPress post revisions
As discussed WordPress keeps post revisions by default. There is no UI to disable it. However, it can be defined in wp-config.php file.

Add the following line of code at the bottom of the wp-config.php file just above (require_once( ABSPATH . 'wp-settings.php' );) to disable WordPRess post revisions.

define('AUTOSAVE_INTERVAL', 300 ); // seconds
define('WP_POST_REVISIONS', false ); 

Place the code above the line: require_once( ABSPATH . 'wp-settings.php' ); 

This code will disable all future revisions to be saved and it will also increase the autosave interval from 60 seconds to 300 seconds. The post will be auto-saving every 5 minute instead of every minute.

2) Set WordPress post revision to a certain number
In my case, I did not disable the post revisions. I wanted to reduce the number of post revisions to keep.  To limit the number of WordPress post revisions, add the following line of code at the bottom of the wp-config.php file.

/** No. of revisions to keep */
define( 'WP_POST_REVISIONS', 2 );
Place the code above the line: require_once( ABSPATH . 'wp-settings.php' );

This will keep only two post revisions in the database.

3) Delete previous WordPress post revisions

As discussed above, we can disable and limit the post revisions. However, doing the above changes does not remove the previous post revisions already saved in the database, which are occupying unnecessary space.

To delete the previous post revisions from WordPress database, do the following:
  • Login to your host Control Panel
  • Launch phpMyAdmin
See the post revisions in WordPress database:

Launch phpMyAdmin > Click on SQL tab and run the query:

SELECT ID,post_title,post_type FROM `wp_posts` where post_type="revision";

Note: If table prefix (wp) has been changed, use appropriate table prefix in your case.

This query will show you all the posts which are of type - post revisions.

wordpress-post-revisions-phymyadmin





Find out how many post revisions are there in the WordPress database:

Launch phpMyAdmin > Click on SQL tab and run the query:

SELECT count(*) FROM `wp_posts` where post_type="revision";

Note: If table prefix (wp) has been changed, use appropriate table prefix in your case.

This query will display the number of post revisions in the database.

Delete the post revisions from database:

To delete the post revisions, run the following query from phpMyAdmin:

DELETE FROM wp_posts WHERE post_type = "revision";

Note: If table prefix (wp) has been changed, use appropriate table prefix in your case.

The steps in this post should disable Post revisions, set a limit to the number of post revisions to keep and delete all previously saved post revisions stored in the WordPress database.

Post revisions may be a useful feature but if it is not necessary for you, you may following the steps above to disable or limit the post revisions as discussed.


Saturday, April 27, 2019

WordPress: How to display only limited number of most popular tags in WordPress Tag Cloud and keep same font size?

wordpress-tag-cloud

In WordPress, there is a widget called "Tag Cloud" which displays the Tags used in posts. This is useful when we want to display a list of Tags in widget areas so that visitors can quickly find related posts by Tag. In this post, we shall see -
  • How to limit the number of most popular tags to display in the Tag Cloud widget?
  • How to keep the same font size of the Tags in the display?
Read more »

Saturday, September 29, 2018

Solution for: Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress

cookies-blocked-not-supported-browser-enable-to-use-wordpress

On some clients' website built using WordPress, there was this error:
Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress

If you also have a WordPress website where you are seeing the error "Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress" when attempting to login, please find the solution below.
Read more »

Saturday, June 2, 2018

How to add cookie consent notification and cookie policy page to WordPress website ?

cookie consent wordpress

European Union (EU) laws require websites to give EU visitors information about cookies used on website. In many cases, these laws also require websites to obtain consent from the visitor.
Read more »

Tuesday, May 1, 2018

How to add custom ads.txt to Blogger / WordPress / Other websites?


how-to-add-custom-ads-txt-blogger-wordpress-website

What is Ads.txt ?


Authorized Digital Sellers, or ads.txt is an IAB initiative that helps ensure that the digital ad inventory is only sold through sellers you identify as authorized. Creating your own ads.txt file gives you more control over who is allowed to sell ads on your website and helps prevent counterfeit inventory from being presented to advertisers. An ads.txt file can help buyers identify genuine inventory and help publisher receive more advertiser spend that otherwise might have gone toward counterfeit inventory.

In this post we shall see "How to add ads.txt to Blogger / WordPress / Other websites?"..


Read more »

Monday, April 9, 2018

How to stop spam subscribers on WordPress email subscribe form?

wordpress-stop-spam-subscribers

Email subscription forms are very essential for any website to let visitors subscribe to new contents. Email subscription forms will also let website owners collect emails which can be used for online marketing. However, mail subscribe forms may also attract a lot of spam subscribers. In this post, we shall see how to stop spam subscribers on WordPress email subscribe form using free plugins.

Before we discuss how to stop spam subscribers, let's discuss briefly how to include a Subscribe Form in WordPress.
Read more »

Wednesday, February 21, 2018

How to resolve 500 Internal Server Error on WordPress after migration?

wordpress-500-internal-server-error

Migrated a WordPress site from local development computer to a production server and encountering 500 Internal Server Errors when visiting posts or pages like the error message below:
The server encountered an internal error or misconfiguration and was unable to complete your request.
In this post we shall see How to resolve 500 Internal Server Error on WordPress after migration?


Read more »

Friday, November 24, 2017

Useful WordPress PLugin to resolve HTTPS insecure content and mixed content warnings on WordPress

wordpress-plugin-insecure-mixed-content-errors

Nowadays, most recent browsers expect websites to have HTTPS in the URL, meaning SSL certificate installed on server, which makes websites which used to be accessible over simple, insecure HTTP protocol to more secured HTTPS. In one of the previous post -I posted about "How to fix partially encrypted/mixed content errors after switching from HTTP to HTTPs (SSL)". In this post, we shall discuss particularly on "How to resolve HTTPS insecure content and mixed content warnings on WordPress Websites?"
Read more »

Tuesday, November 21, 2017

How to create a WordPress Child Theme?


WordPress has tons of free and premium themes you can use for almost any kind of website. But there may be a need to do some customization here and there to fit your need. Customization should not be done on a base WordPress theme as the changes will be lost when the theme is updated to a new version. That is why it is always important to use a WordPress child theme instead. In this post we shall discuss about how to create a Child Theme in WordPress.
Read more »

Sunday, November 19, 2017

Remove or modify Copyright From WordPress Free Theme's Child Theme Footer


Remove or modify Copyright or credit links from WordPress Theme's Child Theme Footer? The title seems a little confusing, but what I mean is if you want to remove or modify the copyright link in the footer of a child theme whose parent theme is a WordPress Theme wherein the creators allow editing or removing the credit links. Phew! Well, I specifically mentioned "allow to remove the credits" because, "free theme" doesn't mean we can always freely remove credits from themes wherever we want. And since it is the work of others, it is recommended to credit the creators though I know many people remove the credits just like that. 

Anyway, in this post we shall discuss how to remove or modify the copyright credit link from the footer of a child theme of a WordPress theme, which allows removing the credit links.
Read more »

Wednesday, November 8, 2017

How to Fix the HTTP File Upload Error in WordPress?

http_error_file_upload_wordpress

How to Fix the HTTP File Upload Error in WordPress?
Today, I encountered an HTTP error when uploading file (a pdf) to WordPress website. While editing a post or page, on clicking 'Add Media', the file seems to upload as the progress bar progresses but after a while WordPress shows HTTP error. In this post, I would like to share how I resolved or fixed the HTTP File Upload Error in WordPress.
Read more »

Wednesday, September 13, 2017

Issue importing WordPress database from development to live server: 1273 - Unknown collation: 'utf8mb4_unicode_520_ci'


So I was trying to import a MySQL database exported from local development machine to a live server and I got the error thrown by phpMyAdmin:
#1273 - Unknown collation: 'utf8mb4_unicode_520_ci'
On some systems, the error could be: Unknown collation: 'utf8mb4_unicode_ci'
Read more »

Monday, September 11, 2017

How to fix WordPress plugin update fail - Plugin update failed ?



Alright, so I had some notifications in a WordPress website to update some plugins, which is damn easy in WordPress. Yes, just click update and finish. But no, this time, a new situation had cropped up. On clicking on 'Update' from the interface, I got the message "Update Failed: Plugin update failed". I immediately turned to Google, searched for solutions others have tried for this WordPress plugin update failed error. Here are a few things findings and solution that worked for me. 
Read more »

Sunday, August 13, 2017

Useful WordPress Plugins for Admin User Interface Customization, Maintenance Mode etc.


WordPress is a pretty easy to use Content Management System (CMS) for blogging and for development of various kinds of websites. WordPress after installation can be used as is pretty easily but there are lots of things in the WordPress admin area that some users don’t need to see or use. Requirement to customize the admin pages might arise to hide certain things that are not required to be displayed to other users granted access to manage the website- such as Authors, Editors and Contributors etc. For example WordPress by default shows some default widgets such as WordPress news in the Dashboard area. This may not be required by some to be shown to Authors/Editors. Similarly, admins may like to hide some post meta-data as too many data can be overwhelming to some. Admins can decide what is appropriate for their users to see or not. For all such requirements, there are plugins available for customization of Admin User Interface.

Some useful WordPress Plugins for Admin User Interface Customization

Read more »

Sunday, July 23, 2017

How to edit or hide "Thank you for creating with WordPress" link in WordPress admin pages?

hide-thank-you-for-creating-with-wordpress-2

If you are a WordPress website admin, you might have noticed that there is a link in every admin page - "Thank you for creating with WordPress"  - at the bottom. Now if you have created website using WordPress, it is okay to give a little credit. But this link is visible only to admins and not to visitors. So it is actually useless. In this post, we shall see how to change or edit the "Thank you for creating with WordPress" link in WordPress admin pages.
Read more »

How to Disable or Hide WordPress Dashboard Widgets?

hide-disable-wordpress-default-widgets-in-dashboard

If you have a WordPress website installed, you might have seen that there are some default widgets on the WordPress dashboard as shown in the screenshot above. The WordPress dashboard is the landing page right after an admin logs in. The default widgets (as of WordPress version 4.8 ) are - "At a glance", "Activity", Quick Draft" and "WordPress events and news". There may also be some other widgets available by default from plugins we installed. In this post, we will see how to disable or disable unnecessary widgets from the WordPress dashboard.
Read more »

Wednesday, July 19, 2017

Display YouTube videos in a gallery in WordPress website and how to get YouTube API Key

youtube-videos-gallery-wordpress-plugin-api
YouTube Videos Gallery in WordPress

There may come time when we need to show YouTube videos on websites. As most of us may already know, we can easily embed YouTube videos in web pages by simply copying the YouTube embed code from a particular YouTube video and put it in web page to display the YouTube video. Similarly, we can show YouTube library.

In this post, we shall discuss how to add a YouTube videos gallery in WordPress website that I did for one project recently. The requirement is to post videos on a YouTube channel and show the same to the WordPress YouTube Gallery to display.
Read more »

Friday, June 30, 2017

How to receive emails from website using contact forms?

Contact Forms are great to let website visitors contact you for any queries or for specific purpose. Contact Forms are found on most websites nowadays. When we build a website, we usually include a “Contact form" on the website for users to contact us. Once we buy a domain and hosting services from a service provider to host the website, we also usually get email address along with it. And it looks professional to have emails with the website domain name instead of using internet email such as gmail or Yahoo mail. In this post, we shall see how to setup Contact Form and how to receive emails sent from the website.
Read more »

Sunday, June 25, 2017

How to hide featured image on single WordPress posts and pages content?

hide-featured-image-wordpress

The 'featured image' feature in WordPress is a way to assign a separate image to be displayed as post thumbnails in post feeds such as recent content, related content, category posts, etc. But there are times when a developer may want to hide the featured image on individual posts and pages, show on some posts and not on others. In this post, we shall see how to hide featured image on WordPress single posts and/or pages content.
Read more »

Google Search Consile Error - Submitted URL marked ‘noindex’

Sitemaps are important from SEO perspective. If you have installed the WordPress plugin Google XML Sitemaps , and you have submitted a link ...