Build your WordPress website with Elementor.Discover Elementor Affiliate link
Français

Site appearance

Security · Beginner to intermediate

WordPress logs and backups: check private storage

Use the administration interface to check where WordPress logs and backups are stored, who can view them, and restoration on a local copy.

Source published: · Source updated: · Editorial policy

Read the French edition

Address the exposure before continuing downloads

A link opens a technical log, backup archive or site export without requesting authorization. The file may contain only error messages, but it may also contain customer data, internal identifiers or secrets. The goal is to close public access, preserve useful evidence and assess what was actually exposed.

Do not share this link on a forum or ask several people to download the file to confirm the problem. Notify the owner and hosting provider through a known private channel. If a copy is already on your computer, protect it and avoid attaching it to an ordinary message.

The appearance of a public file does not automatically prove an intrusion. It may have been placed there during legitimate work. Its availability still needs to be corrected promptly, without waiting to find out whether anyone took advantage of it.

Identify the file and the already known access path

Keep the reference already included in the report, the time of discovery and the service concerned. Record only the information supplied. Have the person responsible match the report to hosting or storage settings through the organization’s panel.

Distinguish three situations. A directory listing reveals filenames; a direct URL can download a file even without a listing; a signed temporary link can authorize limited access without making all storage public. These situations require different settings.

Check that the domain and service belong to your organization. A file served by external storage or a CDN may remain accessible after a change in WordPress. If you lack the relevant permissions, have the account owner identified. Site administrator access does not authorize changes to every associated service.

Preserve minimal evidence in a private location

Ask the provider to preserve the file concerned, its date information and available access logs without multiplying copies. Keep a record of settings before the change and the time public access was closed. A screenshot containing personal data must remain in an area reserved for the case.

Useful evidence does not require reading an entire exported database. An authorized person can identify the nature and period of the content from a protected copy, then record the data categories involved. Do not copy the secrets themselves into the tracking report.

Keep a private original before removing the public version, especially if it is the only available backup. Do not delete a whole set of logs or archives to make the symptom disappear. The hosting provider can restrict access and preserve content at the same time.

Choose the correction according to the delivery path

The first approach removes sharing added to content, such as a link, attachment or media-library document. Then ask the person responsible to check the file’s delivery rule in the administration interface of the service storing it.

The second approach addresses a log or archive placed in the server’s public directory. The hosting provider can block its delivery and prepare private storage. This is appropriate when the file should never be downloaded anonymously, even by someone who knows its name.

The third approach concerns the CDN, object storage and sharing links. Several addresses may provide access to the same content. Close the relevant paths and address cached copies. Choose based on the real URL and service; do not change every file permission on the site for a limited exposure.

Approach 1: remove the link without confusing visibility with protection

An authorized editor can open the page advertising the download and remove the relevant link or block, after preserving its state for the case. Also check the menu or message where the file was announced. This reduces its distribution but does not necessarily close the file’s address.

Changing a post’s visibility affects that page. From the storage service’s panel, verify that the rule for the file itself restricts access to authorized people.

If the document was uploaded to the media library by mistake, have the original preserved in a private area and coordinate removal of the public copy with the person responsible. Before permanent deletion, confirm its uses and retention location. Rollback must not mean putting a confidential backup back into the media library.

Approach 2: separate private storage from the site directory

With authorized access to the hosting panel or SFTP, have the directory actually served by the domain confirmed. Its name may resemble public_html or httpdocs, but these are examples, not universal paths. A folder named “private” inside this area is not private just because of its name.

For an archive that should not be distributed, request a copy outside web directories, with access limited to authorized people. Have the copy and its usefulness confirmed before removing public access. The file must not be lost simply because it contained sensitive information.

An active log also requires changing its write destination. Moving it without changing the component may cause a new copy to be created in the old location. Check the path actually used and the access of the service writing the log. If you lack this information, involve the hosting provider rather than moving folders at random.

Have delivery blocked at the layer serving the file

When the file cannot be removed immediately, ask the server administrator to close web access while retaining necessary technical access. Provide the reference already reported. The administrator records the setting applied and its scope in the service panel.

Apache and Nginx are configured differently. Apache has authorization directives, among others; Nginx manages its own access rules in the site configuration. An .htaccess file does not magically apply a rule to Nginx. On managed hosting, prefer intervention by the provider over a generic example.

Have the configuration backed up before correction and its syntax checked. If a rule causes an outage, rollback must retain suitable containment, such as a temporary site restriction agreed with the owner. Do not deliberately make the sensitive file publicly accessible again to restore a public feature.

Closing a directory index does not close every file

The server panel distinguishes displaying a folder’s listing from its file permissions. Apache offers the Indexes setting, among others, and Nginx has autoindex. The administrator must separately check the listing state and the access rule for the file already reported.

After disabling listing, check in the service configuration that the access rule for the reported file also covers the delivery path described in the case. Document the rule and its scope with the storage owner.

Also ask how future archives are created. A backup protected today may be replaced tomorrow with a new name not covered by an overly specific rule. The lasting choice is a private location or a policy suited to the destination directory, with its effects on other files checked.

Approach 3: examine external storage and its independent access routes

If the URL belongs to object storage, identify the relevant container with its owner. The same file may be served through a custom domain, a provider’s public address or an application. Blocking a single name does not prove the other routes are closed.

For Cloudflare R2 already in use, open the relevant bucket, then Settings. Access through Custom Domains and Public Development URL is independent. The owner can disable the relevant public domain and development URL when they should not expose this content. Confirm what other files are served before closing access globally.

Do not delete the bucket to resolve the incident. Preserve its data and settings useful for analysis. A signed link or an application delivering the file requires its own permission and validity checks. If its scope is unknown, have the mechanism examined; do not publish the link in an external checking tool.

Address caches after closing the source

A response may have been retained by a CDN or another intermediate cache. After blocking the source, have the relevant URLs purged in the service actually used. On Cloudflare, a per-file purge targets a URL; a custom cache key may require accounting for additional variants.

Record source closure and purge status in the cache dashboard. Ask the provider to confirm the scope of the operation if the panel shows only some settings.

An appropriate Cache-Control header helps control future storage but does not recall every response already retained. It does not replace access authorization: a response marked private may still be delivered by the server to whoever requests it if no control forbids this. Keep blocking, purging and their verification distinct.

Identify exposed secrets without copying them

From the private copy, an authorized person identifies the categories present: configuration information, database export, service tokens or personal data. The report states which categories and systems are involved; it must not become a second list of readable passwords.

If a usable secret appears in an exposed file, have the service owner promptly arrange its revocation or replacement. Record the applications using it to avoid an unexpected interruption. Rotation is more than changing a value in WordPress: the service validating access and legitimate consumers must be brought into alignment.

Preserve recovery capability during the operation. Do not restore an old, potentially exposed secret to reverse an outage caused by its rotation. If a dependency fails, have its configuration corrected with a new authorized value. The absence of a visible download in an incomplete log does not prove the secret remained confidential.

Correct the mechanism recreating the log or backup

In WordPress, debugging and error display are separate settings. Have the maintainer record the log’s effective destination and verify that it remains in a private area when debugging is needed.

After preserving useful traces, have obsolete temporary settings removed or logging redirected to a suitable private destination. Do not duplicate constants in the configuration. The administrator checks the WordPress version, existing definitions and permissions of the writing service before making the change.

For an automated backup, examine the destination configured in the tool already used. Changing only the existing archive lets the next run recreate the exposure. Keep the useful schedule, but correct storage, delivery permissions and retention. Checking the next authorized backup must confirm that the old public path is not reused.

Adapt the intervention to WordPress.com and Multisite networks

On WordPress.com, first identify whether the file comes from the media library, file access available under the plan or an external service. Server operations are not necessarily available. Give support the known URL and request removal from public delivery with private preservation, without assuming a post setting affects all media.

Do not use a global site privacy change as the sole proof that access is closed. File paths, caches and integrations must be checked according to the service actually used. Preserve legitimate functions and have the consequences of a temporary restriction clarified.

In Multisite, a directory or archive may contain data from several subsites. Involve the network owner to identify that scope. A rule applied from a single site may be insufficient; moving a shared folder may affect others. The correction and access to the analysis copy must respect this scope.

Check the next creation through the administration interface

Prepare an isolated local copy with fictional content, dedicated storage and outgoing integrations neutralized. The authorized operator must be able to check the setting, produce a sample log or small demonstration backup and read the result through the intended administration interface. Record the date, role, declared location and result. Keep data excerpts and secrets out of the check sheet.

The expected result combines creation in the right location, viewing by the authorized role and the expected denial for the restricted role. Separately record retention, the next scheduled run and the person responsible for checking. On managed hosting where these settings are hidden, ask support to confirm the destination, access scope and restoration procedure.

  1. In the hosting panel, identify the directory actually served and the area reserved for private files. In the backup tool or log configuration, check the destination used and the service writing there. Have the resolved path confirmed if hosting uses mounts, aliases or links. For external storage, record the chosen container and its accounts’ permissions from its dashboard.
  2. Check who can write and who can view. On the copy, an authorized fictional role opens the sample record through the administration interface. A fictional editorial role without permission to read these files must be denied access through that same interface. If the tool does not allow this second check on the copy, record the authorization rule displayed and ask the owner to verify its enforcement.
  3. On the copy, have a new item created by the intended mechanism. For a log, use a harmless sandbox event. For a backup, use a tiny dataset and a practice destination. Check the recorded path, creation time and presence of the sample in the private area through the panel. For the backup, also confirm restoration to a separate local destination before counting it as usable.
  4. If the displayed destination is unexpected, the fictional editorial role can read the sample or restoration fails, stop testing. Keep the record, the last usable private copy and active protections. Have the tool setting or targeted permission corrected, then repeat the fictional creation. Rollback must retain a private location and restricted access.

Remove public visibility and document the resolution

If the report received mentions a Google result, the Search Console property owner can request temporary removal after closing source access. Track the request from the verified property and separately retain evidence of the provider’s protection setting.

The resolution record distinguishes configured protections, treatment of copies already reported, revoked secrets and the destination of future creations. Record known periods and the limitations of the record. If personal data is involved, send the findings through the channel reserved for the person responsible for protecting it.

Reserve private storage for archives and logs. Document their owner, retention, necessary access and next check. The expected result combines a restrictive delivery rule with a verified new creation in the right area.

Do not confuse stopping display with stopping logging

In WordPress, disabling WP_DEBUG_DISPLAY does not delete a log or prevent its download. This setting concerns error display. WP_DEBUG_LOG can retain a logging destination, and its operation depends on debugging being enabled. The maintainer must record existing constants without creating duplicates.

On the copy, have a harmless event generated after changing the destination and verify its arrival in the expected private log. Also check that the old destination is not recreated. The documentation allows a custom log path; it must suit the server, sit outside served directories and be writable by the necessary service. Do not blindly copy an example path. If the event disappears, correct the destination or targeted permissions while retaining containment of the previously exposed file.

Sources and references

Use these references to check the features, requirements and limitations described. Reading documentation is not a practical test.

View 14 references

English translation of the reviewed French edition. Code examples retain their original identifiers, comments and output strings for reproducibility. Linked exercise files and original screenshots may contain French. No new practical tests or price checks are implied by translation.

Continue reading in English