WordPress Login Redirect Loop: Fix Being Sent Back to wp-login
You type the right password and WordPress sends you back to the login page. The cause is usually cookies, address settings, caching…
Caching has four layers that each solve a different problem. Learn what page, object, browser and CDN caches do, and what to exclude on a store.
WordPress caching means keeping a ready-made copy of something so it does not have to be rebuilt or downloaded again. There is no single “cache”: a WordPress site can use a page cache, an object cache, the visitor’s browser cache and a CDN, and each solves a different problem. Mixing them up is why people see old content after an edit, a broken cart on a store, or no speed gain at all. This guide explains the four layers in plain terms, what to exclude on dynamic sites such as stores, and how to purge them in a sensible order.
A page cache stores finished HTML pages so WordPress and the database do not run for every visit. An object cache stores the results of database lookups in memory, and WordPress’s is not persistent unless you add a backend. The browser cache keeps files on the visitor’s device according to HTTP headers, and a CDN is a shared cache close to visitors. Use a page cache on almost every site, exclude cart, checkout and account pages on stores, add a persistent object cache only if your host supports it and your site needs it, set sensible browser cache headers, and purge from the origin outward after a change.
How this guide was prepared: it is research-based. We used the MDN HTTP caching guide, the WordPress object cache reference and the WooCommerce caching guidance listed under Sources, checked on October 23, 2026, plus our own use of a server-level cache plugin on this website. We did not test your hosting, and results vary by site.
| Layer | What it stores | Where | Helps with |
|---|---|---|---|
| Page cache | Finished HTML pages | On your server, a plugin or a server-level cache | Slow page builds, high server load |
| Object cache | Results of database queries and computed data | In memory on your server | Repeated database work, slow admin |
| Browser cache | Images, styles, scripts and sometimes HTML | The visitor’s device | Repeat visits and page navigation |
| CDN (shared cache) | Files, and sometimes pages, copied near visitors | Servers around the world | Distance, traffic spikes |

Without a page cache, WordPress runs PHP and queries the database for every visit. A page cache saves the finished HTML and serves it directly, which usually makes the biggest difference for public pages. It can run in a plugin or in the web server itself; on this website we use a server-level cache plugin. The catch is that a cached page is the same for everyone, so it must not be used for pages that differ per visitor.
WordPress’s object cache stores computed results in memory so they need not be fetched from the database again. The WordPress reference says it is non-persistent by default: the data lives only for one request. Persistence needs a backend plugin such as Redis or Memcached, and defining WP_CACHE in wp-config.php does nothing on its own. A persistent object cache helps busy, dynamic sites, such as stores, the most; for a small brochure site it adds little. Without one, the Transients API falls back to the options table. See WordPress database cleanup for what lives there.
The visitor’s browser keeps files according to the HTTP headers your server sends. MDN explains Cache-Control: max-age says how long a file stays fresh, no-store forbids storing, no-cache allows storing but requires revalidation, private limits storage to the browser and immutable tells the browser not to revalidate a file that never changes. An ETag lets the browser ask whether a file changed and receive a short 304 answer if not. Long lifetimes are safe for files whose names change when they change, such as versioned assets.
MDN describes a CDN as a managed shared cache between visitors and your server. It copies your files, and sometimes pages, to servers close to visitors, which cuts delay and absorbs traffic. A CDN can be purged when content changes, which an ordinary proxy cannot. Check that it respects your cache headers and does not store private pages.
WooCommerce’s documentation says the Cart, My Account and Checkout pages must be excluded from page caching, and that caching must also ignore the cookies woocommerce_items_in_cart and wp_woocommerce_session_. Many caching plugins already do this, but verify it. Membership sites, logged-in areas and pages with personal content need the same care. If checkout breaks after enabling a cache, see WooCommerce cart empty after adding products and WooCommerce checkout not working.
When you change something and still see the old version, clear caches from the origin outward: your page builder’s generated files, the object cache, the page cache, the host or server cache, the CDN, and finally your browser. Test in a private window. For Elementor specifically, see Elementor changes not showing. After any caching change, test login, forms and checkout.
A page cache, usually from your host or a plugin, because it helps most public pages.
Only if your site is dynamic and busy and your host supports it. Many sites do not need it.
One of the layers still holds an old copy. Purge from the origin outward.
No. They work together: the page cache reduces work on your server, and the CDN reduces distance.
List which layers you use, check the exclusions and fix the purge order. If you would like help, wpallsolution offers WordPress maintenance packages with speed work in the higher tiers. We cannot promise a speed result.
You type the right password and WordPress sends you back to the login page. The cause is usually cookies, address settings, caching…
Most break-ins start at the login screen. Use this practical checklist for passwords, two-step login, admin accounts, attempt limits and HTTPS.
A staging site lets you test updates on a copy before customers see them. Learn how to create one, lock it down…
Black FridayCyber Monday sale
Before you go,
Our biggest discount of the year on the first payment of every maintenance plan.
BF2026 at checkout