WordPress Plug in Tutorial

Solution to the conflict between WP Postviews count invalidation and WP Super Cache

Published on: August 14, 2012 7:44:44

Author:

Last updated on July 29, 2018

The solution to the conflict between the invalid WP Postviews count and WP Super Cache: because the WP theme used by this site is too large, the number of plug-ins is increasing day by day, which directly leads to the gradual decline of website access speed. In order to reduce the server load and speed up the website response, I chose to install the cache plug-in WP Super Cache. Mm-hmm. After the installation, the login and refresh speed is good~

But the next day, I found a problem. The number of views of articles every day is not counted, and refreshing is useless. Naturally, I wonder if wp postviews conflicts with the Wp Super Cache plug-in just installed? Baidu has a look, and it really has this precedent. To sum up, there are four solutions to this problem:

Scheme I:

Since we need to record the access of each page, we just need to disable caching in logs and pages. Find the "Accepted Filenames&Rejected URIs" in the WP Super Cache background, and then click Single Posts and Pages to save according to the following settings.

In this way, the cache will not be enabled for log pages and independent pages, and the access can be recorded normally. The disadvantage is that these two pages can no longer accelerate the cache. Comments: This scheme is equivalent to abolishing the basic functions of the plug-in. So, the following

Scheme II:

① Disable the WP Super Cache plug-in in the background.
② Delete the wp super cache directory of the/wp content/plugins/directory.
③ Delete the cache directory under the wp content directory.
Don't forget the last and most important step!

Modify wp-config.php in the root directory and delete the following line:

define(’WP_CACHE’, true);
Well, now the articles can be counted again.

Comment: The plug-in has been removed. Of course, everything is back to normal. If they are not abolished, can they coexist harmoniously? See below

Scheme III:

Enter the plug-in wp postviews, open the file wp postviews. php, and find the code

if(defined(’WP_CACHE’) && WP_CACHE)
Replace with

if((defined(’WP_CACHE’) && WP_CACHE) || (defined(’COSMETA’) && COSMETA))
The test is valid. Note: This method is still valid for the secondary development of WP PostViews Plus.

Small beast wordpress relies on years of Wordpress enterprise theme Production experience, adhering to the purpose of "wordpress theme born for users", has provided quality wordpress website building services for more than 100000 customers, and has received unanimous praise from customers. We always treat every customer with our heart. We firmly believe that "treat customers well, and they will become lifelong customers". Wordpress can persist for many years because we are always honest. We clearly mark the price( How much does wordpress cost to build a website )We never cheat any customer. Our quotation tenet is: "refuse to make excessive profits and only keep reasonable profits". If you have a need for website construction, website revision, website maintenance, etc., please immediately consult the online customer service on the right or call the hotline: 18907337671, and we will answer your questions one by one in detail.

Related articles

Why choose WordPress

Even the time input regardless of cost will never fail any customer.
Make the world a little better while making customers and themselves.

our story

WordPress, a small beast, started to contact the Internet in 2011. During this period, a blog called WordPress, a small beast, was built with WordPress to learn how to build WordPress websites.

Our mission

We hope to use WordPress, an excellent website building program, to help everyone build their own website and do Internet marketing well with high efficiency and low cost.

Our culture

We focus on doing our customers' things well and correctly, which means that we will consider the results when making decisions, and most importantly, we strive to be true.

Our future

We will become the best WordPress studio in China in the near future. Xiaoshou WordPress hopes to become friends with every customer and witness this beautiful future together.

 Why choose WordPress

Tell me who you are, and customize the site building scheme for you

We know that different people have different stages of building websites, some are novices, and some are veterans.
We know that different people have different purposes for websites, some are for display, and some are for marketing.

How to make online business go to the next level

 No WordPress website yet

No WordPress website yet

No matter what industry you are engaged in, WordPress will provide you with a professional theme template. There are thousands of free themes in the WordPress market, suitable for many small and medium-sized enterprises.

View all templates
 Already has a WordPress website

Already has a WordPress website

Small beast WordPress sincerely invites you to learn WordPress together, and is willing to work with all parties to upgrade and improve your WordPress website, and exchange website acceleration, website optimization and other issues.

Make a friend now
We can contact with each other in wechat
 chat Scan code to contact
Template construction
Pick Template
Website customization
Free diagnosis
Consulting hotline
Consulting hotline

189-0733-7671

Back to top