No plugin makes a WordPress site compliant with Québec’s Law 25 or with the GDPR. A banner is a user interface; the obligations sit in the platform underneath it. What moves your posture is concrete: consent obtained before a non-essential script loads rather than after it fires, a published notice naming the person responsible for the protection of personal information, a working path to obtain a copy of one’s information, correct it, delete it and take it elsewhere, retention that executes on logs and backups, a plain statement of whether personal information goes outside Québec, and a register of confidentiality incidents. This guide covers how to build those on WordPress. Whether the result satisfies your obligations is a legal determination, not a technical one.
What you’ll accomplish
- A consent mechanism that gates loading — third-party tags absent from the page until a purpose-specific consent exists, not merely queued behind one.
- A written inventory naming every table, directory, log, backup and processor holding information about identifiable people.
- A published notice naming the responsible person and a monitored contact point, describing how to exercise access, correction, deletion and portability, and saying whether information leaves Québec.
- A rights-request path producing a real export archive, a correction that propagates past the row you edited, a deletion that reaches the rows plugins created, and a portable copy in a structured format.
- Retention that runs on revisions, export archives, access logs and backup objects, plus an incident register and a named person who decides whether an incident is reportable.
Prerequisites
- WordPress 4.9.6 or newer for the built-in personal-data tools; in practice a currently supported 6.x release. Check with
wp core version. - Administrator plus shell access to the host, with WP-CLI available and credentials that can run
wp db query. - Knowledge of where the data physically lives: which region hosts the database and uploads, where backups are replicated, which third parties receive copies. Law 25 has you inform people about communication outside Québec, so “somewhere on the cloud” is not an answer you can give yourself.
- A named person who owns privacy decisions. Law 25 requires the responsibility be assigned and the person’s title and contact published; by default it sits with the person of highest authority unless delegated in writing.
This is operational guidance, not legal advice. Law 25 — Québec’s law modernising the protection of personal information, phased in from 2022 through 2024 — and the GDPR are different instruments with different scopes, thresholds and regulators. Nothing here establishes that any configuration satisfies either one, and where a deadline, threshold or exception matters, confirm it against the current statute.
How it works
A visitor arrives with no cookie. Before WordPress renders anything, something has to read the consent state — usually a first-party cookie — and decide which scripts get printed into the HTML. Done right, the analytics tag is not in the response body at all until consent exists. Done wrong, the banner appears over a page that has already contacted three ad networks.
Downstream of that gate, WordPress and its plugins write personal information into places that are easy to forget: comments carry names and IP addresses, users carry profiles and metadata, form plugins carry whatever the form asked for, orders carry addresses and purchase history. All of it lands in the database, the uploads directory and the access logs, then gets copied into every backup inside your retention window. An erasure touching only the first leaves the rest behind. Note the split: the consent gate governs non-essential third parties; the copies you keep are governed by retention policy, and those get asked about.
Where the two line up. Both treat the IP address in an access log as information about an identifiable person, both give a right to a copy of what you hold and to correction of what is wrong, and both expect consent for non-essential tracking to be purpose-specific, freely given, as easy to withdraw as to give, and collected before the tracker runs. One consent gate and one inventory serve both.
Where they diverge, and it matters on a Québec site.
- The GDPR offers several lawful bases, and legitimate interest carries a lot of ordinary analytics work. The Québec framework is built around consent with statutory exceptions rather than a menu of bases.
- Law 25 requires a designated person responsible for the protection of personal information — by default the person of highest authority, unless delegated in writing — with title and contact published. The GDPR requires a data protection officer only in defined situations.
- Law 25 requires you to tell the person, at collection, whether their information may be communicated outside Québec, and expects an assessment before it leaves; the GDPR’s transfer regime is mostly about the mechanism between the parties. Law 25 also requires that any function allowing a person to be identified, located or profiled be deactivated by default, with the person told it exists — a direct instruction about how your analytics plugins ship.
- Deletion differs most. The GDPR’s erasure right is broad and conditional; Québec’s is narrower, framed around ceasing dissemination or de-indexing where conditions are met, beside a general rule that information be destroyed or anonymised once its purpose is fulfilled. On WordPress the retention rule does more work than the deletion request.
Keep those as two columns, not one checklist.
Step-by-step
-
Inventory the personal information first. You cannot honour an access, correction or erasure request against stores you never enumerated. Start with core:
wp core version wp user list --fields=ID,user_login,user_email --format=count wp comment list --format=count wp post list --post_type=revision --format=countExpected output is four plain values, for example
6.8.1,412,1875,9204. That last count is the usual surprise: every draft that ever held a name is still inwp_posts. Then find the tables plugins created:wp db query "SHOW TABLES" --skip-column-names wp db query "SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = DATABASE() ORDER BY table_rows DESC LIMIT 15" --skip-column-namesExpected output is the table list, then fifteen name-and-row-count pairs, largest first. Anything named like
wp_wpforms_entries,wp_gf_entry,wp_frm_itemsorwp_newsletterholds submitted personal information; sample three rows before trusting the name. Write the result down with six columns: what information, which store, why you hold it, how long, who else receives it, whether it leaves Québec. That document is the deliverable, not a plugin screen. On multisite, drive every command withwp site list --field=urland--url=.Verify: every table returned by
SHOW TABLESis either on your inventory or marked as holding no personal information. -
Wire consent so tags cannot fire before it exists. The requirement is prior blocking, not deferred loading. A platform that injects Google Tag Manager on page load and then withholds a “consent granted” event still makes a third-party request before consent exists. Sort every script and cookie into two piles and defend the sorting:
- No prior consent needed. Session, login, cart, CSRF token, cache-variant cookie, and the record of the consent choice itself — strictly necessary to deliver what the person asked for.
- Prior consent needed. Analytics, tag managers, ad and conversion pixels, heatmaps and session recorders, vendor-hosted chat, embedded video and maps, third-party fonts, A/B tools. Anything whose function is to identify, locate or profile ships deactivated by default.
Then check what your page actually sends:
curl -s https://example.com/ | grep -oE 'googletagmanager|google-analytics|connect\.facebook\.net|hotjar|youtube\.com/embed'On a correctly gated page with no consent cookie this returns nothing and exits
1. Matches mean the tags are in the HTML whatever the banner says. Fix it at the source: enqueue analytics and marketing scripts through a handler that will not run without a matching consent value, and replace bare YouTube and Maps embeds with click-to-load placeholders. Consent has to be per-purpose, unbundled, unticked by default, and withdrawable with the effort it took to give — a standing control, not a one-time banner.Verify: re-run the
curlwith an empty cookie jar and it stays silent. Then grant analytics only: its tag appears, the ad pixel still does not. -
Publish the privacy notice and name who is responsible. Law 25 expects an enterprise collecting personal information through a website to publish a policy in clear and simple language, plus the title and contact details of the person responsible for protecting it. The notice carries the collection-time disclosures too: why you collect, how, the rights of access and correction, that consent can be withdrawn, who inside the enterprise sees the information, which third parties receive it, whether it may be communicated outside Québec. Write them as sentences a customer can read. WordPress has a slot for the page, and the core request emails render from it:
wp option update wp_page_for_privacy_policy 42 wp post get $(wp option get wp_page_for_privacy_policy) --field=post_statusExpected output is
Success: Updated 'wp_page_for_privacy_policy' option.thenpublish; a0fromwp option get wp_page_for_privacy_policymeans no page is set. Then grep the page content for an address and confirm it is a mailbox someone actually monitors — if the notice carries no contact point, a request has nowhere to arrive.Verify: the page names the responsible person by title, gives a monitored address, states whether information goes outside Québec, and is one click from the footer.
-
Turn on the built-in export and erase tools, then extend them. Core ships them under Tools → Export Personal Data and Tools → Erase Personal Data: you enter an address, core sends a confirmation email, and the request proceeds only once the person clicks through. They cover core data — user record, comments, session tokens — plus any plugin that registered itself. Confirm who participates:
wp eval 'global $wp_filter; print_r( array_keys( $wp_filter["wp_privacy_personal_data_exporters"]->callbacks ) );' wp eval 'global $wp_filter; print_r( array_keys( $wp_filter["wp_privacy_personal_data_erasers"]->callbacks ) );'Expected output is a printed array of priority keys, one per registered hook. An empty array means nothing beyond core registered, so your export will be incomplete while still reporting success.
For every store from step 1 that does not appear, add a must-use plugin hooking
wp_privacy_personal_data_exportersandwp_privacy_personal_data_erasers, querying the table by email address and returning entries in core’s expected shape. Re-run the commands above: your priority should now sit next to core’s. An unchanged array means the plugin is not loading fromwp-content/mu-plugins/. Correction is the one core does not automate at all, so write down per store how a value gets fixed and what else changes with it — the search index, the object cache, the CRM, the mailing-list provider. A correction that stops at the database row is not one the person experiences. Form submissions are the usual gap; their finer mechanics are in WordPress form data under GDPR and PIPEDA.Verify: the export archive for a test address contains the form entry you submitted, and the erasure drops its row.
-
Run every rights request through one intake and one register. Access, correction, deletion and portability differ in what you produce, not in how the request is handled. Date-stamp it on arrival — the statutory window runs from receipt and a non-answer inside it is treated as a refusal, so confirm the current number of days against the statute. Verify who is asking before disclosing anything, without collecting more than the verification needs. Then classify, produce, log.
Portability covers computerized personal information collected from the person, in a structured, commonly used technological format — a PDF of a screenshot is not that. Core’s export is a fair start because it writes machine-readable JSON beside the HTML; check that the file you send is the structured one. Core records requests as posts, so you can list them:
wp post list --post_type=user_request --post_status=any --fields=ID,post_title,post_status,post_date --format=tableExpected output is a table whose
post_statuscolumn showsrequest-pending,request-confirmedorrequest-completed, one row per request. An empty table on a site that has answered requests means they run out of an inbox, unrecorded.Verify: every request from the last year appears in that table or in your own register, with a receipt date, an outcome and a closing date.
-
Set retention on logs, revisions, archives and backups, and prove it runs. Personal information should not outlive its purpose, and the IP addresses in access logs are personal information. Cap post revisions in
wp-config.phpwithdefine( 'WP_POST_REVISIONS', 5 );, then trim what accumulated and confirm core’s cleanup job is scheduled:wp post delete $(wp post list --post_type=revision --format=ids) --force wp cron event list --fields=hook,next_run_relative | grep privacyExpected output is a run of
Success: Deleted postlines, then a row forwp_privacy_delete_old_export_fileswith a next run soon. That job removes generated export archives after a few days; without it, ZIP files holding someone’s full profile sit inwp-content/uploads/wp-personal-data-exports/indefinitely — a store you created yourself while answering a privacy request. Backups need the same treatment, and the usual failure is setting retention in the WordPress plugin but never applying a lifecycle rule where the objects actually live. Pick the window deliberately, apply it at the storage destination, and state in your inventory that erasing a live row does not erase it from yesterday’s snapshot.Verify: the cleanup event is listed with a future run time, and the exports directory holds no archive older than your stated window.
-
Stand up a confidentiality-incident register and the route to reporting. Law 25 requires an enterprise to keep a register of confidentiality incidents, to take reasonable measures to reduce the risk of injury, and — where an incident presents a risk of serious injury — to notify the Commission d’accès à l’information and the people concerned with diligence. Every incident goes in the register, including ones you conclude are not reportable — that conclusion is part of what it shows. Record the description, when it occurred, when you became aware, how many people are affected, the risk of injury, the measures taken, whether notice was given. The prerequisite is evidence — you cannot describe an incident you cannot reconstruct:
ls -1t /var/log/nginx/access.log* | tail -1 zcat -f $(ls -1t /var/log/nginx/access.log* | tail -1) | head -1Expected output is the oldest retained log’s filename, then its first line with a timestamp such as
26/Jul/2026:03:14:02 -0400. If that date is a week old, an incident that began a month ago cannot be reconstructed and the entry becomes a guess — balance that against step 6 rather than keeping logs forever. The escalation path belongs in an incident notification playbook written before you need it.Verify: the register exists with at least those columns, a named person is on record as deciding reportability, and log retention is long enough to fill them.
Validate it works
Three checks and one reading separate a configured site from a claimed one.
No non-essential cookie before consent. Request the homepage with no cookies:
curl -s -D - -o /dev/null https://example.com/ | grep -i '^set-cookie'
Expected output is session, security and cache-variant cookies only. Anything named _ga, _gid or _fbp is a failure. Repeat in a private window with devtools on the Network tab — it catches tags injected by JavaScript after load, which curl misses. Then accept analytics only: its request appears, marketing requests still do not.
The export tool produces a real archive. Trigger a request against an address you control, confirm it from the admin screen, then open the ZIP:
wp eval 'wp_create_user_request( "you@example.com", "export_personal_data" );'
ls -lh wp-content/uploads/wp-personal-data-exports/
Expected output is a numeric request ID, then a listing with a ZIP and its JSON companion. Open the index.html inside: it should hold what you know exists — the comment you left, the form you submitted, the order you placed. A ZIP holding only the user profile means the step 4 exporters are not registered.
Erasure actually removes rows. Count first, erase, count again:
wp db query "SELECT COUNT(*) FROM wp_comments WHERE comment_author_email = 'you@example.com'" --skip-column-names
wp eval 'wp_create_user_request( "you@example.com", "remove_personal_data" );'
wp db query "SELECT COUNT(*) FROM wp_comments WHERE comment_author_email = 'you@example.com'" --skip-column-names
Expected output is a non-zero count, a request ID, then 0 once the request is confirmed and processed. If the count holds, the erasure ran against core only, or the request was never confirmed.
The reading: put the published notice beside the step 1 inventory and check that every category you collect is described, every processor is named or covered, and the statement about communication outside Québec is true of the region your database, uploads, backups and mail sender are really in. That one fails most often — the notice was written once and the stack moved.
Troubleshooting
The banner shows but the scripts already loaded. Symptom: curl on a cookie-free request returns googletagmanager in the HTML. Cause: the consent plugin is a UI layer over tags hard-coded in the theme or injected by another plugin. Fix: remove those tags from the theme and enqueue them from a handler that checks consent first. Deferring a tag is not blocking it.
Personal information survives an erasure in revisions or form tables. Symptom: the comment count drops to zero but wp_posts still returns the person’s name. Cause: post revisions and plugin tables are outside the erasers’ reach. Fix: extend the erasers as in step 4, and purge revisions as part of the erasure procedure rather than as a one-off cleanup.
Requests arrive by email and never enter the system. Symptom: the user_request post list is empty on a site that has answered several requests. Cause: somebody replied from their own inbox, so nothing was date-stamped and nobody can say when the window started. Fix: route every request to one monitored mailbox that opens a ticket on arrival, record the receipt date, and create the matching core request.
When this is the wrong approach
Configuration stops being the answer when the question is legal rather than technical. Whether a collection is permitted at all, whether an incident presents a risk of serious injury and so must be reported to the Commission d’accès à l’information and to the people concerned, whether a privacy impact assessment is required before you launch a system, how a deletion request interacts with records you are separately required to keep — none of those are answered by a setting. The 72-hour notification clock is a GDPR rule; Law 25’s obligation is framed around diligence and the risk of serious injury, so track the two separately.
If you are configuring your way around an unclear obligation, stop and get counsel plus a designated person responsible for the protection of personal information. The Commission d’accès à l’information du Québec publishes guidance at cai.gouv.qc.ca, and the core tools are covered in the WordPress documentation. Build the groundwork so that whatever the lawyers decide, the platform can do it.
Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.