Category: Performance & Security

  • PHP Workers Explained: How Many Does Your Site Need?

    PHP Workers Explained: How Many Does Your Site Need?

    The first time one of my WooCommerce stores threw 504 errors during a sale, the CPU graph looked healthy — barely 40% load. The server wasn’t out of power. It was out of PHP workers. Every worker was busy building a page, checkout requests were stacking up in a queue behind them, and after 60 seconds the queue gave up and served errors to paying customers.

    PHP workers are the most under-explained line item in WordPress hosting — hosts bill by them, cap them, and upsell them, yet most plan pages barely define them. Here’s what they actually do, a sizing rule you can apply in two minutes, and the worker-limit table the hosts won’t publish side by side.

    What a PHP worker actually does

    A PHP worker is one process that can build one uncached WordPress page at a time. When a request hits your site, one of two things happens. If the page is in cache, the server hands back a pre-built copy — no worker involved, effectively free. If it isn’t cached — a logged-in user, a cart, a checkout, a search, a REST or admin-ajax call — a worker picks it up, loads WordPress, runs your theme and every active plugin, queries the database, assembles the HTML, and only then frees up for the next request.

    Think supermarket checkout lanes. Cached pages are the self-serve shelf by the door. Everything else has to go through a lane, and your worker count is how many lanes exist. Two workers means two uncached requests can be processed simultaneously — the third waits in line, no matter how powerful the rest of the server is.

    How many PHP workers do you need?

    The rule of thumb I size against: one PHP worker handles roughly 1–2 uncached requests per second, assuming your average PHP response time is in the 500ms–1s range. So the real question isn’t traffic — it’s how much of your traffic bypasses the cache.

    • Brochure site or blog with full-page caching. 95%+ of hits never touch PHP. 2 workers is genuinely enough.
    • Busy blog with search, comments, and logged-in authors. 2–4 workers.
    • Small WooCommerce store (under ~50 orders/day). 4–6 workers. Cart, checkout, and my-account pages bypass cache by design.
    • Busy WooCommerce, membership, or LMS site. 6–10 or more. Nearly every pageview here is personalized and uncacheable.

    The multiplication that trips people up: worker capacity and code speed are the same lever. Four workers at a 1-second average response clear about 4 uncached requests per second — roughly 14,000 an hour, plenty for most stores. Let a slow plugin drag average response to 3 seconds and those same four workers now clear barely 1.3 per second. Your capacity just fell by two-thirds and you didn’t change plans.

    PHP worker limits by host

    This is the table I wish someone had shown me before I picked hosting for my first store. Figures are approximate and current at the time of writing — plans change, so treat these as the shape of each host’s policy rather than gospel.

    Workers on entry planHow you get moreWhat happens at the limit
    Kinsta2 per site (~$30–35/mo)Plan upgrade or paid worker add-onRequests queue, then 502/504; dashboard logs worker-limit hits
    WP EngineNot published (~$20–25/mo entry)Plan tier; support tunes concurrencyConcurrency throttling at the edge under heavy load
    Liquid WebNo per-plan capYou tune PHP-FPM yourself; bounded by RAM/CPUServer resources, not policy, set the ceiling
    CloudwaysNo per-plan cap (~$11–14/mo)Resize the server; workers scale with itBounded by the server size you chose

    Notice the split. Kinsta and WP Engine sell fixed allocations — predictable, well-monitored, and excellent for the sites they fit, but you buy headroom in steps. Liquid Web and Cloudways sell resources — the worker ceiling is whatever your hardware can hold, which favors dynamic-heavy sites. That philosophical split is most of the argument in our Liquid Web vs Kinsta comparison, and it’s why the verdict there flips depending on how much of your traffic is uncacheable.

    Why too few workers causes 504 errors

    The failure mode is a queue, not a crash. When every worker is busy, new uncached requests wait. If the wait exceeds the gateway timeout — usually 60 seconds — the visitor gets a 504. If PHP-FPM’s own backlog fills, they get a 502 instead. Same root cause, different error page.

    The diagnostic signature is distinctive: errors arrive in bursts under load while CPU and memory look fine, and they hit dynamic pages first — checkout fails while the cached homepage loads instantly. On my sites the usual triggers have been a sale or email blast landing all at once, bots hammering uncacheable search and filter URLs, wp-cron pile-ups, and — sneakiest of all — a slow payment gateway holding workers open for 10+ seconds per checkout while the API on the other end struggles. Confirm it in your host’s dashboard (Kinsta logs worker-limit hits explicitly) or look for “upstream timed out” lines in the error log.

    How to need fewer workers

    Before you pay for more workers, make the ones you have finish faster. Every 50% cut in average response time effectively doubles your worker capacity — for free.

    • Get full-page caching right. Audit what’s excluded. I’ve seen stores where a misconfigured plugin excluded every URL with a query string — one UTM-tagged campaign turned the whole site uncacheable.
    • Add object caching (Redis). Repeat database queries come from memory, responses finish sooner, workers free faster. The single biggest win on most WooCommerce sites I’ve tuned.
    • Hunt slow plugins and queries. Query Monitor or your host’s APM will name the offender. One slow plugin taxes every single uncached request.
    • Move wp-cron to a real cron job. Otherwise scheduled tasks piggyback on visitor requests and steal workers at the worst moments.
    • Rate-limit the bots. Crawlers love faceted search and add-to-cart URLs — 100% uncacheable, 0% revenue.

    More workers, or a different host?

    If you’re on a fixed-allocation host and you’ve bought worker add-ons twice, stop and do the math. Add-ons stack up fast, and at some point you’re paying boutique prices for capacity a resource-based plan includes by default. That trade-off — polish and managed guardrails versus raw headroom — is the honest version of the is managed WordPress hosting worth it question, and for stores specifically I’ve laid out where the tipping point sits in our best WooCommerce hosting for small stores guide.

    My own shorthand after running sites on all four hosts above: content sites almost never outgrow a fixed allocation, and stores almost always do. If you’re weighing the two premium fixed-allocation options against each other first, start with Kinsta vs WP Engine — workers are only one line in that fight.

    Frequently asked questions

    What are PHP workers in WordPress?

    PHP workers are the server processes that build uncached WordPress pages. Each worker handles one request at a time — loading WordPress, running plugins, querying the database, and returning HTML. Your worker count is the number of uncached requests your site can process simultaneously.

    How many PHP workers do I need for WooCommerce?

    Most small stores run well on 4–6 workers; busy stores need 6–10 or more. WooCommerce needs more than content sites because cart, checkout, and account pages bypass caching entirely, so a much larger share of requests requires a worker.

    Do PHP workers matter if I use a caching plugin?

    Less — but they still matter. Caching removes most anonymous pageviews from the worker pool, which is why a well-cached blog survives on 2 workers. But logged-in users, carts, checkouts, search, and API calls always bypass cache, and those are usually the requests you can least afford to fail.

    Can too few PHP workers cause 504 errors?

    Yes — it’s one of the most common causes on managed WordPress hosting. When all workers are busy, new requests queue, and once the wait passes the gateway timeout the server returns a 504 (or a 502 if the backlog fills). The tell: errors during traffic spikes while CPU usage still looks low.

    Does adding more PHP workers make my site faster?

    Not directly. Workers add concurrency, not speed — page generation takes the same time whether you have 2 workers or 10. More workers stop requests from queueing under load. If pages are slow with no traffic, fix the code and the caching; workers won’t help.

    Want the guided version? Our free courses walk you through this start to finish — including “Launch Your First Website with Claude.”

  • How to Get Your Website Cited by ChatGPT and AI Search

    How to Get Your Website Cited by ChatGPT and AI Search

    Eighteen months ago I started grepping access logs for GPTBot the way I used to watch for Googlebot. Back then it was a curiosity — a few dozen hits a week. Now, across the dozen-plus sites I run, AI crawlers are a steady slice of all bot traffic, and referral visits from ChatGPT and Perplexity convert at somewhere around double my organic-search average. The volume is still small. The intent is not.

    Getting cited by AI search is not the same game as classic SEO, and most of what’s published about it is theory written by people who haven’t tested anything. I’ve run the experiments — same content on different hosts, with and without llms.txt, schema on and off — and the pattern is blunt: speed and structure decide who gets quoted. Most of the fashionable tactics don’t. Here’s the evidence-led version.

    How AI search actually picks its citations

    Your site shows up in an AI answer through one of two doors. The first is training data — the model absorbed your content months ago, and you can’t influence that on any useful timescale. The second is retrieval, and that’s the one you can win. When someone asks ChatGPT Search, Perplexity, or Google’s AI Overviews a question, the system runs a live search, fetches a shortlist of candidate pages, extracts the passages that answer the question, and cites the survivors.

    That pipeline has three gates: you have to be in the underlying search index, your page has to come back fast enough for the fetcher to bother, and your content has to be extractable — a clean, self-contained passage the model can lift and attribute. You are not optimizing for a ranking. You are optimizing to be the easiest page to quote.

    One prerequisite before anything else: check robots.txt. If you — or a security plugin, or an overzealous WAF rule — blocked GPTBot, OAI-SearchBot, PerplexityBot, or Google-Extended somewhere along the way, nothing else in this guide matters. I’ve audited sites that spent months on “AI SEO” while their firewall quietly returned 403s to every AI user agent that knocked.

    llms.txt — does it actually work?

    llms.txt is a proposed standard: a markdown file at your site root that hands language models a curated map of your most important content. It takes ten minutes to create, and every AI-SEO thread on X treats it as step one. So I tested it — deployed on half of my sites since early 2025, deliberately left off the rest.

    The result: no citation difference I can attribute to it. My logs show the major AI crawlers requesting llms.txt rarely or never, and no major provider has confirmed consuming it. The public crawl-data analyses I’ve read land in the same place. It’s a lottery ticket, not a strategy.

    Ship one anyway if you like — it’s harmless, and the standard may get real adoption later. But it’s dessert, not dinner. Here’s where the effort-to-impact ratio actually sits, based on my testing:

    TacticEffortCitation impact
    Allow AI crawlers in robots.txtMinutesPrerequisite — nothing works without it
    Fast origin (TTFB under ~200ms)Depends on your hostHigh — the strongest pattern in the data
    Answer-first page structureOngoing disciplineHigh
    Article + FAQ schemaLowModerate — helps entity disambiguation
    llms.txtMinutesNegligible today
    Paid “GEO” tool subscriptions$100+/moMostly repackaged versions of the rows above

    Speed is the citation factor nobody budgets for

    A large 2025 analysis of pages cited in ChatGPT answers found that pages with first contentful paint under 0.4 seconds picked up citations at roughly three times the rate of slower pages. That matches what I see in miniature: my fastest sites collect the citations, and my slower experiments — carrying content of the same quality — mostly don’t.

    The mechanics explain it. Retrieval fetchers run on tight timeouts and pull a shortlist of candidates in parallel. If your origin takes two seconds to start responding, you drop out of the candidate set before the model reads a word. And unlike Googlebot, most AI fetchers don’t render JavaScript and won’t circle back later to give you a second chance. One slow response is a lost citation.

    Here’s the part most GEO advice skips: AI crawlers disproportionately hit your pages cold. They pull deep, odd URLs that aren’t sitting warm in your page cache, so what they experience is your uncached origin performance — PHP execution, database queries, worker availability. If you’ve read my PHP workers guide, this is that same bottleneck wearing a new hat.

    This is where hosting stops being a commodity decision. On cheap shared hosting I routinely measure uncached TTFB between 600ms and 1.5 seconds — disqualifying. The sites I run on Kinsta (Google Cloud C2 machines behind Cloudflare’s enterprise edge) hold uncached TTFB around the 200ms mark, and WP Engine‘s EverCache stack does similar work at a lower entry price — ~$20–25/mo at the time of writing. My full numbers are in the managed WordPress hosting comparison and the AI web hosting pillar. For AI visibility specifically, treat origin speed as a ranking factor you buy, not one you tune into existence on a $4 plan.

    Write so a machine can lift the answer

    Extraction rewards a specific shape. When I rewrote one underperforming guide into that shape — no new information, same topic — it started appearing in Perplexity answers within a few weeks. The shape:

    • Answer first. The first sentence under every heading should be a complete, standalone answer in roughly 40–60 words. Context and caveats come after, never before.
    • Headings as questions. Phrase h2s the way a person actually asks. Retrieval matches queries to passages, and a matching heading is the strongest signal that a passage answers the query.
    • Lists and tables. Structured fragments get lifted disproportionately — they arrive pre-chunked for the model.
    • One idea per section. A passage that mixes three topics survives extraction as zero citations.
    • Visible dates and a named author. Assistants lean toward fresh, attributable sources — anonymous, undated pages get passed over for the same facts published with a byline.

    None of this fights classic SEO. It’s the featured-snippet playbook with the screws tightened.

    Schema that actually gets read

    Structured data won’t rescue a slow, muddled page, but it does two jobs well. It disambiguates who you are — Organization and Person markup with sameAs links ties your site to an entity the model already knows — and it labels what your content is: Article with author and dates, FAQPage where you genuinely have Q&As. In my testing that’s the moderate-impact tier. Measurable, not magical.

    On WordPress, Rank Math or Yoast covers the basics; validate with Google’s Rich Results test rather than trusting the plugin’s green light. And if you’re on WP Engine, their Smart Search add-on builds vector indexes of your own content for on-site AI search — a different job than external citations, but the same structured-content discipline feeds both. Setup walkthrough in my Smart Search guide.

    How to know it’s working

    There’s no Search Console for AI citations yet, so measurement is manual. Three habits cover it:

    • Grep your access logs monthly for GPTBot, OAI-SearchBot, PerplexityBot, and ClaudeBot. Rising crawl frequency reliably shows up before rising citations do.
    • Segment AI referrals in analytics. Filter for chatgpt.com and perplexity.ai referrers. These visitors arrive pre-sold — the assistant already vouched for you — which is why their conversion rates run high.
    • Ask the money questions yourself. Once a month I put my ten most valuable queries to ChatGPT, Perplexity, and Google AI Overviews and record who gets cited. It’s tedious, and it’s the single most honest metric available.

    Expect lag. Retrieval systems pick up fast pages in days to weeks, but citation share builds over months as your crawl history deepens. This is a compounding channel, not a campaign.

    Frequently asked questions

    How do I get my website cited by ChatGPT?

    Allow GPTBot and OAI-SearchBot in robots.txt, get your uncached TTFB under roughly 200ms, and structure pages so every heading is followed by a standalone 40–60 word answer. Citations go to pages that are indexable, fast, and extractable — in that order.

    Does llms.txt actually improve AI visibility?

    Not measurably, as of mid-2026. No major AI provider has confirmed using it, and in my own split testing across a dozen sites it produced no attributable citation difference. It’s harmless to add — just spend your real effort on speed and structure first.

    How long does it take to show up in AI search results?

    Retrieval-based systems like ChatGPT Search and Perplexity can cite new or updated pages within days to a few weeks of crawling them. Getting absorbed into a model’s training data takes many months and isn’t worth planning around.

    Should I block AI crawlers instead of courting them?

    If your business is selling the content itself, maybe. For most site owners, AI answers are becoming a discovery channel, and blocking GPTBot trades long-term visibility for short-term principle. I allow retrieval bots on every commercial site I run.

    Want the guided version? Our free courses walk you through building a fast, citation-ready site start to finish — including “Launch Your First Website with Claude.”