# Website Strange Data Delay

**URL:** https://discourse.roots.io/t/website-strange-data-delay/11102
**Category:** jobs
**Created:** 2017-12-09T18:36:45Z
**Posts:** 19

## Post 1 by @nlott — 2017-12-09T18:36:45Z

Hi,

I have a website I’m working on [staging.environmentcelebration.nlott.com](http://staging.environmentcelebration.nlott.com) using bedrock/trellis and I’ve been noticing there is a strange delay that’s happens.

I’m using woocommerce and If I add/remove items into my shopping cart sometime they don’t show up or get removed right away.

I’m also noticing this also when I’m developing and updating php files directly on this staging site that sometimes when I refresh my browser the changes aren’t appearing.

I’ve experimented both with having the cache enabled and cache disabled. I’ve experimented with clearing the caches.

Does anyone have any experience with this and I’m not sure how to troubleshoot? I’m using wordpress 4.8.2.

My clear cache command:

```
ansible "web:&staging" -m command -a "composer clear-cache" -u web
```

My wordpress\_sites.yml

```
branch: master
multisite:
 enabled: false
ssl:
 enabled: true
 provider: letsencrypt
cache:
 enabled: false
```

---

## Post 2 by @nlott — 2017-12-09T19:17:58Z

I’m willing to hire someone to troubleshoot this.

---

## Post 3 by @MWDelaney — 2017-12-09T19:24:46Z

Are you running any caching plug-ins on your site? Or caching services? Who is your host?

---

## Post 4 by @nlott — 2017-12-09T19:31:38Z

My host is digital ocean. Its a 1GB Ram / 30 GB Disk Ubuntu 16.04.

There are no caching plugins directly installed in Wordpress. Here are all my plugins installed:

| Query Monitor | | by John Blackbourn – 2.15.0 |
| --- | --- | --- |
| Excel to LearnDash | | by [http://www.wppluginsforyou.com](http://www.wppluginsforyou.com) – 3.4 |
| Add From Server | | by Dion Hulse – 3.3.3 |
| Akismet Anti-Spam | | by Automattic – 4.0 |
| Auto Subpage Menu | | by Nathachai Thongniran – 1.1.5 |
| Better Notifications for WordPress | | by Made with Fuel – 1.6.7 |
| Content Views | | by CVSOFT LLC – 1.9.9.3 |
| Content Views Pro | | by CVSOFT Ltd – 4.7.4 |
| Custom Post Type UI | | by WebDevStudios – 1.5.5 |
| CPT Layout Injector | | by Sean Barton - Tortoise IT – 3.5 |
| Easy Media Download | | by naa986 – 1.1.2 |
| Enable Media Replace | | by Måns Jonasson – 3.1.1 |
| Free Responsive iframe Video Embeds | | by iPlayerHD – 1.0.4 |
| Jetpack by [WordPress.com](http://WordPress.com) | | by Automattic – 5.3 |
| LearnDash Course Grid | | by LearnDash – 1.4.1 |
| LearnDash LMS - Notifications | | by LearnDash – 1.0 |
| LearnDash ProPanel | | by LearnDash – 2.1.0 |
| LearnDash WooCommerce Integration | | by LearnDash – 1.4.0 – Not tested with the active version of WooCommerce |
| LearnDash LMS | | by LearnDash – 2.4.7 |
| LearnDash Zapier | | by LearnDash – 1.1.0 |
| LoginPress - Customizing the WordPress Login | | by WPBrigade – 1.0.22 |
| Multiple Roles | | by Florian TIAR – 1.2.0 |
| Nav Menu Roles | | by Kathy Darling – 1.8.6 |
| Ninja Forms - Conditional Logic | | by The WP Ninjas – 3.0.17 |
| Ninja Forms - Mail Chimp | | by The WP Ninjas – 3.0.4 |
| Ninja Forms - File Uploads | | by The WP Ninjas – 3.0.15 |
| Ninja Forms | | by The WP Ninjas – 3.2.1 |
| PayPal for WooCommerce | | by Angell EYE – 1.4.6.8 – Not tested with the active version of WooCommerce |
| PayPal IPN for WordPress | | by Angell EYE – 1.1.2 |
| Popup Maker | | by WP Popup Maker – 1.6.6 |
| Post Snippets | | by David de Boer – 2.5.3 |
| Query Recorder | | by Delicious Brains – 1.0.1 |
| Regenerate Thumbnails | | by Alex Mills (Viper007Bond) – 2.3.1 |
| Server IP & Memory Usage Display | | by Apasionados, Apasionados del Marketing – 2.0.3 |
| Simple Lightbox | | by Archetyped – 2.6.0 |
| Transients Manager | | by Pippin Williamson – 1.7.3 |
| Uncanny LearnDash Toolkit | | by [www.uncannyowl.com](http://www.uncannyowl.com) – 2.1 |
| Uncanny LearnDash Toolkit Pro | | by Uncanny Owl – 2.1.7 |
| Users Insights | | by Pexeto – 3.3.0 |
| Advanced Messages for WooCommerce | | by Jeroen Sormani – 1.2.0 – Not tested with the active version of WooCommerce |
| WooCommerce Advanced Shipping Packages | | by WooCommerce – 1.1.4 – Not tested with the active version of WooCommerce |
| WooCommerce Conditional Shipping and Payments | | by SomewhereWarm – 1.2.9 – Not tested with the active version of WooCommerce |
| WooCommerce Products Visibility | | by codemine – 2.4 – Not tested with the active version of WooCommerce |
| WooCommerce FedEx Shipping | | by WooCommerce – 3.4.9 – Not tested with the active version of WooCommerce |
| WooCommerce USPS Shipping | | by WooCommerce – 4.4.10 – Not tested with the active version of WooCommerce |
| WooCommerce - ShipStation Integration | | by WooCommerce – 4.1.18 – Not tested with the active version of WooCommerce |
| WooCommerce | | by Automattic – 3.2.5 |
| WP LESS | | by Oncle Tom – 1.8.0 |
| WP-Mail-SMTP | | by WPForms – 0.10.1 |
| WP Migrate DB Pro CLI | | by Delicious Brains – 1.3 |
| WP Migrate DB Pro | | by Delicious Brains – 1.7.2 |
| WP-Sweep | | by Lester ‘GaMerZ’ Chan – 1.0.10 |
| Custom Product Tabs for WooCommerce | | by YIKES, Inc – 1.5.17 – Not tested with the active version of WooCommerce |

---

## Post 5 by @MWDelaney — 2017-12-09T19:36:01Z

Doesn’t Jetpack include some basic caching? And you’re not using CloudFlare or anything like that?

---

## Post 6 by @nlott — 2017-12-09T19:37:38Z

Jetpack is disabled and I’m not using cloudfare to my knowledge.

---

## Post 7 by @MWDelaney — 2017-12-09T19:39:51Z

You showed that you have caching disabled in `wordpress_sites.yml`; was it ever enabled? Did you reprovision your server after setting it to disabled? Deploying and provisioning are different things.

---

## Post 8 by @nlott — 2017-12-09T19:41:32Z

Thanks for the clarification – it was enabled – its actually enabled on my production instance which is showing the same behavior.

I may have only deployed. How do I reprovision?

```
cd $ECI_WORKING_DIR/trellis
ansible "web:&staging" -m command -a "composer clear-cache" -u web
ansible-playbook deploy.yml -e env=staging -e site=environmentcelebration.com -e 'project_copy_folders=[]'
```

---

## Post 9 by @MWDelaney — 2017-12-09T19:45:32Z

Provisioning is the “Remote Server” part of the docs, here: [https://roots.io/trellis/docs/remote-server-setup/](https://roots.io/trellis/docs/remote-server-setup/)

The command you want is `ansible-playbook server.yml -e env=<environment>`

Where `<environment>` is “production” or “staging”.

---

## Post 10 by @nlott — 2017-12-09T19:48:31Z

If I provision it – will it be nuked though and then I need to go through the deploy and updating the DB process?

---

## Post 11 by @MWDelaney — 2017-12-09T19:49:20Z

No, it’s safe to reprovision a live site. Try it on staging first, obviously, but you should be fine.

---

## Post 12 by @nlott — 2017-12-10T04:43:37Z

Interesting – I think it might have fixed it – do you normally use caching for your site in the wordpress\_sites.yml? What’s the normal strategy everyone is using?

---

## Post 13 by @MWDelaney — 2017-12-10T16:42:28Z

I often turn on caching. My clients don’t tend to update their content often enough, or with enough urgency, that a cache will cause an issue.

---

## Post 14 by @nlott — 2017-12-11T19:09:33Z

Hi – I’m still having this problem – caching is off and when I make a php file update in one of my plugins its not updating – there’s probably a 30 second - 1 minute delay and then the change appears. If someone is willing to help troubleshoot – I’m happy to pay them.

---

## Post 15 by @nlott — 2017-12-11T19:31:12Z

I’ve updated my nginx so it disables caching – and I’m still seeing the same problem.

~/work/websites/environmentcelebration.com/trellis[master] $ curl -I [http://staging.environmentcelebration.nlott.com](http://staging.environmentcelebration.nlott.com)  
HTTP/1.1 301 Moved Permanently  
Server: nginx  
Date: Mon, 11 Dec 2017 19:30:30 GMT  
Content-Type: text/html  
Content-Length: 178  
Connection: keep-alive  
Location: [https://staging.environmentcelebration.nlott.com/](https://staging.environmentcelebration.nlott.com/)  
Last-Modified: Monday, 11-Dec-2017 19:30:30 GMT  
Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0

---

## Post 16 by @thommeredith — 2017-12-16T15:21:50Z

Please note that you are not clearing nginx cache you are clearing COMPOSER cache, two completely different things.

I recommend NOT turning cache on for staging at all, also when you DO for production, make sure you remove woocommerce cart pages or else you will be showing users other users’ cart contents!

> [@WooCommerce + Roots Stack – BUGGY Cart](https://discourse.roots.io/t/woocommerce-roots-stack-buggy-cart/7554):
>
> Not sure what’s happening here and can’t seem to find much online about it. I have a client site where random items are being added to carts, including my own. It seems as though the cart is “global” and any items added to the cart by anybody are being added to everybody’s cart including my own account. Random items keep popping in to my cart. It’s not ideal as they have just dropped a large amount of new stock and have had a decent spike in traffic. Any ideas?

---

## Post 17 by @MWDelaney — 2017-12-16T16:07:16Z

This is a very good tip. I wonder if this is important enough to roll into Trellis, considering how important to the WP ecosystem Woo is?

---

## Post 18 by @ben — 2017-12-16T17:18:19Z

[https://roots.io/trellis/docs/fastcgi-caching/#example-cache-configurations](https://roots.io/trellis/docs/fastcgi-caching/#example-cache-configurations) has both WooCommerce and EDD examples

Maybe we should add a comment above the cache section in `wordpress_sites.yml` with a link to that?

---

## Post 19 by @MWDelaney — 2017-12-16T17:33:25Z

Maybe. Or I could be better at reviewing the docs more often :slight_smile:
