After the site is written to an abnormal PHP file, why does the official investigation sequence prioritize checking the runtime directory?

📅 October 12, 2026 👁️ 15

The official handling sequence is worth pondering: first upgrade to the fixed version, then delete the running directory, check the rewrite rules of pseudo-static, investigate abnormal PHP files, and explain that the problem is related to historical version vulnerabilities. The running directory is placed at a very early position, not by chance - it is both the most common point of injection and mostly renewable content. Deleting it will not damage the site data, and after cleaning, it can also be used as a reference for recurrence.

Order given in the announcement

The order itself has logic

Steps Purpose Why is the order here
Upgrade to the fixed version Close the exploited entry If not upgraded first, it will be rewritten again after cleaning
Delete the running directory Clean up common drop points Mostly renewable content, deleting does not harm the data
Check rewrite rules Check if it has been tampered with The change in rules indicates that there is more than one place
Check for abnormal files Find other landing points Only after the first two steps are completed can a clean baseline be obtained

Upgrade first and then talk about cleaning because cleaning when the entry is not closed is equal to doing nothing

Why should the running directory be cleared first

The running directory usually contains renewable content such as cache, temporary compilation products, etc., and the normal site can also be rebuilt. Therefore, it is low-risk and effective to clear it all at once. It is also the place where attackers like to drop files - the path is writable and the access is direct. Clearing here first not only maximizes the probability of removing the landed scripts but also leaves a 'clean baseline'. After that, any abnormality can be judged whether it recurs.

Why the static rule has been tampered with

The rewrite rule is one of the execution entry points, and being modified usually means that the attacker has left a backdoor or wants to ensure stable access to their files. When you see that the rule has been tampered with, you should not assume that only this place has been changed. You should expand the scope: other writable directories, scheduled tasks, upload directories should also be checked.

Why do we look at historical version vulnerabilities first

In the announcement, the problem is pointed out to be related to vulnerabilities in historical versions, which determines that the investigation cannot only focus on the current file. Most of the exploited entries are left by old versions, upgrading to the fixed version is to close the entry, deleting the running directory and investigating abnormal files is to clear the traces, both must be done. Only cleaning without upgrading, or only upgrading without investigating, will leave room for recurrence.

There are two things to confirm after cleaning up.

The backup time point must be earlier than the intrusion time; otherwise, recovering from the backup is the same as recovering the backdoor as well. This step relies on the data backup and recovery capability to ensure it. The second is to narrow down the writable surface: prevent the collection of interference codes, content verification, and sensitive word filtering to reduce the input surface that can be exploited. Combine with authentication and escaping class protection to prevent injection and cross-site scripting. Cleaning the files is stopping the bleeding, while closing the mouth is to prevent recurrence. Only after these two things are done, can we talk about putting the site back into normal operation and maintenance rhythm.

Common questions

Question: Is it okay to just delete files without upgrading?No. The entry is not closed, and the files will be rewritten again after deletion. Upgrading should be the first step, and cleaning up is the second step that follows.

Ask: Will deleting the runtime directory affect the data?Generally, it is renewable cache and temporary content, deleting it will not affect the site data; the text and attachments are stored elsewhere, not at this level.

Ask: How can you determine if the restored backup is clean?Confirm that the backup time is earlier than the earliest suspicious modification, check the rewrite rules and abnormal files immediately after recovery, do not go online directly.

Ask: Is one clear enough?It depends on whether the entrance is closed. After upgrading to the fixed version and narrowing the writable area, the recurrence probability will truly drop.

Related articles

A static generator can build a website in a few seconds, do we still need a content management system with the backend?

The advantages of static generators lie in the construction and hosting stages, where typical sites can be built in seconds; but fast construction does not equal fast maintenance. When content structure, columns, and fields need to be adjusted repeatedly, or when multiple people need to continuously update and batch import historical content, a content management system with a backend is more suitable; here, we compare two routes from four aspects: content model, batch import, template editing, and application scenarios.

2026-10-12

Some pages want AI to crawl for free, while others want to charge for it; how to separate by address path?

It is a feasible practice to divide the area within the same site for different crawling strategies, some service providers have supported setting exceptions according to URI patterns, providing free crawling for specific pages and charging separately for the rest. Within the site, the idea is to organize the pseudo-static rules and robots by path prefix, clearly write the matching scope and effective order, and avoid the exception rules being covered by the rules of the parent directory.

2026-10-12

AI traffic is divided into three categories: search, training, and intelligent agents. After changing the default switch, whether it needs to be reviewed again.

There are edge service providers that divide AI traffic into three categories: search, training, and intelligent agents, and starting from September 15, 2026, they will set a new default value for all customers (including the free tier): allow search traffic, and block training and intelligent agent traffic by default on pages containing ads, and each site can be set separately. The change in default values will affect sites that have never manually changed the settings, and the review should be done layer by layer per site and aligned with the site's robots and anti-crawling settings.

2026-10-12

The second version of llms.txt was released this year, adding discoverability syntax, is it now a standard?

llms.txt was originally proposed in September 2024, v2 in August 2026 added the discoverability writing style through link relations, allowed .md file extension, defined the coverage of sub-paths, and removed the semantic expansion of the context. The specification page explicitly states that it is not a standard, but has been released by a large number of sites, the implementation of each model can be different, and consistency should be maintained when automatically generated on site.

2026-10-12

Before the release of the major version, how many weeks of security support are left for the old branch, and how should the upgrade window be arranged?

At the same time, only a few branches usually receive security fixes, and there will be no official patches for new vulnerabilities from the day the support is discontinued. Taking the release plan of a certain content system as an example, the security release window covers only a few specific branches, and the old branches will end support in the week of the new major version release. The upgrade window should be arranged in reverse order: first determine the day of discontinuing support, then leave time for verification and rollback, data backup must be done within the window, and login credentials must be processed as described in the upgrade instructions for the home version.

2026-10-12

The backend user deletion has been changed to POST submission and form credential verification, preventing which type of attack?

The system contains content that in the version announcement has changed the user deletion and status switching to POST submission and verify the form security credentials, preventing cross-site request forgery from causing users to be mistakenly deleted or their status to be changed. This change blocks cross-site request forgery - attackers exploit the browser to automatically carry the login state. Moving the status change from GET to POST is just the first layer, what really blocks forgery is the credential verification that comes with the form.

2026-10-12

Can WordPress minor versions be directly updated automatically with 11 security fixes in one go?

This is a minor security update for WordPress 7.1.1 that includes 11 security fixes. The official recommendation is to update immediately, and sites that support automatic background updates will start updating automatically. This article explains which steps of the automatic update can be covered, and which situations require manual scheduling of the upgrade window, as well as the backup and credential rotation confirmation to be done before and after the update.

2026-10-13

Storage XSS appears on the comment management page, how did the script get into the background in the pending review comments.

WordPress 7.1.3 fixed a stored XSS vulnerability that could be triggered by pending review comments in the comment management page. This article explains why unreviewed content can still be rendered and executed in the background, the danger lies in treating comments as trusted data output, and the closing should be based on input verification and output escaping, and corresponding to the site's sensitive word filtering, content review and verification code protection.

2026-10-13