Caching plugins will affect the wordpress shop stock control? - wordpress

To avoid a lot of memory consuption on my server. I am thinking to activate server caching and using wordpress caching plugins as well.
However, my wordpress is an online store. So, I am unsure that how it'd work out. Like will enabling caching will cause delays in the stock control in woocommerce?
Like I am afraid if a customer buys an item, it wont be reduced by 1 immediately because of the caching plugin?
Let me know if that is the case?
Regards

You can use a cache plugin with a Wordpress powered online stores, but you must exclude all store related pages from being cached so that they remain dynamic. If they are not, you store will not work correctly. This page will help you correctly configure your WooCommerce store in conjunction with various mainstream caching plugins.

Related

Caching on wordpress and pagebuilders

I am building a website and I am always having issues with development because of caching.
We are using Siteground with the SG Optimizer plugin active, we are using Elementor as page builder, we are using Sucuri who is also caching.
Does anyone knows what do I need to do to be able to see my website as it is, instead of the caching versions ? Many times I click on purge cache on Wordpress, or I go to Siteground to remove Memcache but is like I can't never see the changes i made on elementor in live.
Any help about how to avoir this kind of issues would be great !
Thanks!
Turn off the cache while developing.
Caching is only beneficial once in production.

Do I Still Need A Cache Plugin e.g. W3 Total Cache or WP Super Cache etc. To SpeedUp WordPress?

On an Ubuntu 18.04 Machine With Apache2,
I'm using mod_pagespeed with default settings except 2 options.
I've installed memcached and enabled the following in "/etc/apache2/mods-available/pagespeed.conf" by removing "#"
ModPagespeedMemcachedServers localhost:11211
ModPagespeedCreateSharedMemoryMetadataCache "/var/cache/mod_pagespeed/" 51200
My question is, do I still need a plugin e.g. Autoptimize, W3TC, WP Super Cache and etc. to cache, minify etc. etc.?
Any help would be highly appreciated.
Thanks!
Cache Plugins in general:
Like alway the world is divided into those who love them and those who curse them.
Ask yourself, if you should use them?
Is there any benefit for your page?
That depends on the page. Noone can decide that for you.
Helpful are some seo tools - e.g. Google PageSpeed.
Disable all cache plugins and check your page speed.
Sometimes a page is blown up with many plugins generating tons of code (sad to say not rare duplicated and included twice or more times).
Check your plugins and also check your page (frontend) with the developer tools.
Mostly there are many loads you do not really need.
You mentioned
minify etc.
You can do that by yourself (e.g. with Brackets and the minifier plugin or online on mifier pages).
Even the includes for most of the plugins can be minified.
The intention:
Check your page and optimize it. If it not really needs the cache plugins for some functionallity or an high increase of page speed - why use them?

Dynamic Content not working with WP Super Cache

wonder if someone can help. I am trying to add a cart widget to the header of a woocommerce enabled site. However, when WP Super Cache is enabled, the widget doesn't update when something is added to the cart, understandably.
I am trying to add the following so the widget isn't cached:
<!--dynamic-cached-content-->
<?php echo time(); ?>
<!-- my_dynamic_content(); -->
<!--/dynamic-cached-content-->
I have just displayed the time in this case to see if I can get it working.
I have set the caching to PHP cache, with late init and dynamic caching enabled but the time still doesn't update when I'm logged out of the administrator.
I have trailed through documentation to see if there is another way to get this working but so far I have not found a way.
Can anyone point me in the right direction? Maybe I've got this completely wrong!
I just want one widget to be dynamic in the header.
Thank you in advance.
There are multiple types of cache for web applications, and WordPress has ways to take advantage of all of them.
Plugins like WP Super Cache, W3 Total Cache, and Batcache as well as server components like Varnish and Nginx implement page caching. These tools store a copy of the complete page and use that cached copy every time the same URL is requested. This is the fastest cache available, but the down side is they return the same HTML to everyone.
If you want to use a page cache but still have dynamic elements like your header widget, you'll have to render them in JavaScript.
If you've written your own theme, you can implement fragment caching by storing the rendered HTML of different sections of the page except the part you want to be dynamic. There's no plugin you can download that'll do it for you. You'll need to make your own judgement calls about what needs to be cached and for how long.
Lastly, you can just cache the data used to render pages. Look for information on WordPress persistent object caching or write code to use WordPress's Transients API. A persistent object cache plugin can automatically store the results of WordPress's queries to something like Memcached or Redis if you have that available.

Is it ok to build an entire site with Advanced Custom Fields?

I'm creating a new site in Wordpress and found out this plugin is very powerfull and ended up creating customs fields for almost every part of the website, I've even placed WYSIWYG editors instead of built in ones because it's easier for me to code my templates.
Is it ok to build an entire site with Advanced Custom Fields or it may become an issue in the future?
Since the webpage is based on static products data, WP or plugins updates will rarely be needed.
Is it ok to build an entire site with Advanced Custom Fields
IMO
It is "ok" to build an entire site with a plugin, but would I recommend it? probably not.
The only reason is because you never know what might happen to your site, if you install a "bad" plugin that breaks ACF plugin.
Or let say for some odd reason they stop providing support for ACF or updating it for whatever reason.
I've seen a lot of apps that have a good support system die out or get bought up by conglomerate companies and they stop public development and support.
WP or plugins updates will rarely be needed.
Regardless you should keep updating your wordpress to current versions, you never know about a security exploits people find, wordpress core dev push out new versions to battle those exploits.
This can apply to plugins as well.
Personally
I like to build things myself without the reliance on plugins in general.
That way I only have the tools that I need, instead of extras that a plugin may come with.
Sometimes a few lines of code can go a long way instead of depending on plugins that may have thousands of lines of code.
Let alone wordpress has a lot of native options baked in that you can rely on or extend as opposed to relying heavily on ACF or any other plugin.

How Do I Rollout WP-Cache To 1000 WordPress Blogs?

My client has 1000 WordPress blogs hosted on a server for customers. Each one is in its own domain through cpanel and SuPHP, running in CGI mode on Apache2.2. Now he wants me (I'm the PHP programmer) to get WP-Cache loaded out on each of these blogs and not just activated, but enabled. He also wants the timeout value set to 2 days instead of the default setting.
I have root on LAMP.
What is the preferred way to roll out an update to each blog such that on a page view, it sees if WP-Cache is enabled or not. If not, it needs to copy it out from a central source, activate it, and then enable it along with the different timeout value being used.
A way, maybe not the best way, is to write a script to copy the wp-cache plugin to every wp-content/pulugins folder. Then run another script that will go and modify every DB entry for it enabling it.
If not done correctly this can be devastating as it hits customer db's.
However, one thing to note is wp-cache has a history of killing other plugins. So, if you go in and add this plugin to everyone's wordpress it might hurt there experience if it hurts another plugin they have installed thus increasing support costs as people might be emailing trying to figure out what broke.
I take it this is being done to work on performance issues. Is it possible to maybe do some type of server caching outside of wordpress?
edit: after reading Joes comment I concur with him. Didn't even cross my mind.

Resources