Timeline for What is the best way to cache pages and queries in WordPress?
Current License: CC BY-SA 4.0
19 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 24, 2022 at 18:37 | comment | added | Tom J Nowell♦ | you may find the plugin query monitor useful, it will give you more information, but I'd suggest opening new questions, you can ask lots of questions at the same time, just don't bundle them all together at the same time. Small, simple specific questions can still get you long and useful answers | |
| May 24, 2022 at 18:35 | comment | added | Tom J Nowell♦ | fundamentally, the root of your problem is that you're searching/filtering/finding/displaying posts based on their post meta/custom field values, partially because of the choices of a previous developer, partially for other reasons. That's why your site is slow. As long as you store that data in that way it will be slow, with mitigations to cover it up like page caching etc. It's rare that you can just change how you query the data and get a big improvement with the same results without changing how its stored/structured | |
| May 24, 2022 at 18:18 | vote | accept | DJZEEGLER | ||
| May 24, 2022 at 18:17 | comment | added | DJZEEGLER | Ok. I'm starting to understand how this works. Marked your answer. I didn't realize that was different from upvoting. | |
| May 24, 2022 at 17:20 | comment | added | Tom J Nowell♦ | I'm only interested in the question you wrote, you can always create follow up questions using the ask question button, did this answer the question you wrote? If so consider marking it as the correct answer. ( also I gave some very relevant advice on the question you deleted that directly answered some of the questions you asked in the comments here about queries and data structure ). You can ask specific questions on stack exchange, but if you want an open discussion to try and figure things out then this format doesn't work for that | |
| May 24, 2022 at 16:52 | comment | added | DJZEEGLER | Where can I go to find helpful people who are willing to help me solve the problem I'm trying to solve? I think it's very clear what I'm actually asking, it just seems like my lack of vocabulary is preventing you from helping me know what I need to know. I'd love to ask the right question, if I knew what it was. Can someone help translate what I'm saying into the right vocabulary so you will help me? | |
| May 23, 2022 at 21:56 | comment | added | Tom J Nowell♦ | speeding up queries is a different topic from how to cache pages in WordPress, and both of those are huge subjects on their own. You need to narrow the scope of your Q or ask a new Q if you have related ones to ask. Questions here need to be a specific single question that can be concretely answered with facts, they aren't discussion topics. Keep in mind that your question already has enough close votes for being too broad that 1 more vote would close it. I'm only trying to answer the question you wrote, not the problem you're trying to solve | |
| May 23, 2022 at 20:58 | comment | added | DJZEEGLER | My question is how to make my site's pages load faster. Everything we're talking about is related to my question. When you say the problem is how I stored my data, what do you mean? My question is this. I have some slow queries on my site. How can I speed the pages with those queries up. Is caching the page the best way? If not, what is? | |
| May 18, 2022 at 22:31 | comment | added | Tom J Nowell♦ | no, the problem is how you stored your data, not how you wrote the query. Anyway we're straying very far from the original question and answer, comments are supposed to be for clarifying questions to help understand what is being asked | |
| May 18, 2022 at 21:49 | comment | added | DJZEEGLER | I understand. If it is a blank page with no styling, and the letters 'hi', then it loads very quickly. Downloading and displaying elements is very fast. However, queries are increasing levels of slowness. So, let's say I'm going to rewrite all my queries. I'm assuming wordpress queries are the right thing for me. Is there another way to pull information that's faster and more behind the scenes than wordpress queries? Can I rewrite my queries as SQL queries and store that information somewhere? I'd prefer my pages to just display info. Can I query and store info in another place? | |
| May 18, 2022 at 19:47 | comment | added | Tom J Nowell♦ | Also pages that load quickly don't do many things, and the things they do they do well. You'd need to be more specific. It's not that things make a page faster, it's the opposite, things make a page slower. Your other question that you deleted showed that your previous developer used a framework plugin but wasn't aware that how you store things matters greatly for how fast or slow a query is, and neither were the people who built the framework. Also keep in mind that none of these things are things that are applied to a query, they don't work like stickers or powerups | |
| May 18, 2022 at 19:44 | comment | added | Tom J Nowell♦ | if it were just HTML then that wouldn't be any different to a cached page, but you'd then need to write all the parts manually that queries currently generate for you. A persistent object cache is when your object cache persists between requests, most sites do not have this as it requires additional server level software to be installed, my answer already covers this though. Transients just store text as an option with an expiration time and a name, you're best looking that up though. | |
| May 18, 2022 at 19:24 | comment | added | DJZEEGLER | And what is the kind of thing that makes pages load quickly? I'd love to remove all of the queries from my pages, then it's just html and printed results. Maybe what I'm fishing for is bigger than I realize. Each of my single pages has it's own custom query and loop on it. I only did that because I saw others do that, is there an alternative to that that would make the pages go faster? I understand the answer may be a big one, I just want to know how to start thinking about it correctly. | |
| May 18, 2022 at 19:20 | comment | added | DJZEEGLER | How would a transient look on the site? A transient converts a query to a static result for a limited amount of time? | |
| May 18, 2022 at 19:19 | comment | added | DJZEEGLER | Thank you for your patience, I'm unfamiliar with the language, and especially specific terms, so I'm sort of fishing for the right question to ask. Thank you | |
| May 18, 2022 at 19:18 | comment | added | DJZEEGLER | When you say cache the queries instead, what would that look like? That seems like a great idea to me. What is a persistent object cache? I think that's the kind of solution I'm looking for. You're right that the query is the slow part. I only need those bits to be 'glued'. What's the best way to do that? | |
| May 18, 2022 at 19:16 | comment | added | DJZEEGLER | Thank you for this awesome answer, this is exactly what I was looking for. | |
| May 18, 2022 at 19:13 | history | edited | Tom J Nowell♦ | CC BY-SA 4.0 | added 198 characters in body |
| May 18, 2022 at 19:08 | history | answered | Tom J Nowell♦ | CC BY-SA 4.0 |