We turned scattered TWV WordPress know-how into one canonical doc, an enforced pre-edit safety gate, and this explainer.Gom kiến thức WordPress của TWV (đang rải rác) thành một tài liệu chuẩn, một 'cửa an toàn' bắt buộc đọc trước khi sửa, và bản giải thích này.
The site's structure and hard-won bug lessons lived in chat memory and Python scripts, so the same bugs kept returning. They now live in docs/wordpress-operations.md (structure) and docs/wordpress-safety-rules.md (non-negotiable rules), ported from BEUP and adapted to TWV's real edit surfaces and 3-layer cache.Cấu trúc site và các bài học sửa lỗi từng nằm trong bộ nhớ chat và script Python, nên lỗi cũ cứ lặp lại. Giờ chúng nằm ở docs/wordpress-operations.md (cấu trúc) và docs/wordpress-safety-rules.md (luật bắt buộc), lấy từ BEUP và chỉnh theo đúng 'bề mặt sửa' và cache 3 lớp của TWV.
6-layer thinking chainChuỗi tư duy 6 tầng
hãy khám phá cấu trúc toàn trang, elementor, css, snippet, php, rules, principles, có thể học từ beup explainer liên quan đến wordpress principles khi fix bug, rồi tạo 1 explainer riêng cho tradewithviet — lưu ý cả vietconnect.
Four hosts, one content owner — and the three ways to edit the siteBốn host, một chủ nội dung — và ba cách sửa site
WordPress owns editorial truth; everything else points to it. Inside WordPress, you change things through three surfaces, not one — and a 3-layer cache sits in front of all of them.WordPress giữ 'sự thật' nội dung; mọi thứ khác trỏ về nó. Bên trong WordPress, bạn sửa qua ba bề mặt, không phải một — và cache 3 lớp đứng trước tất cả.
| Technical termThuật ngữ kỹ thuật | Plain nameTên dễ hiểu | RoleVai trò |
|---|---|---|
Elementor kit (post 6390) | Global look | Colors + typography for the whole site. Back up to /tmp first, then clear the Elementor files cache.Màu + font cho toàn site. Sao lưu ra /tmp trước, rồi xóa cache file Elementor. |
Customizer Additional CSS (post 6737) | Site-wide CSS | Buttons, links, dark sections, header/footer, the Metform fix. One consolidated stylesheet — back up its current value before overwriting.Nút, link, mục nền tối, header/footer, fix Metform. Một stylesheet gộp — sao lưu giá trị hiện tại trước khi ghi đè. |
mu-plugins | Structure & behaviour | twv-resource-library (the /resources/ grid), twv-article-style, twv-toc, twv-seo-schema. Edit these, not Elementor, for those features.twv-resource-library (lưới /resources/), twv-article-style, twv-toc, twv-seo-schema. Sửa các file này, không phải Elementor. |
3-layer cache | What hides your change | LiteSpeed + WP-Optimize + Autoptimize. Purge all three after every edit or the page stays stale; a 7-day browser cache sits on top.LiteSpeed + WP-Optimize + Autoptimize. Xóa cả ba sau mỗi lần sửa, không thì trang vẫn cũ; trên cùng còn cache trình duyệt 7 ngày. |
Read it in 30 seconds: the app and the subdomains all point back to WordPress for content; inside WordPress you change one of three surfaces; then you must purge all three caches to actually see it.
Layered decision cardsCác quyết định theo tầng
Artifact mapBản đồ tệp tạo ra
| PathĐường dẫn | WhatLà gì | Who reads itAi dùng |
|---|---|---|
docs/wordpress-operations.md | Durable knowledge doc: topology, access, structure, design system, edit-surface map, VietConnect boundaryTài liệu kiến thức bền: topology, truy cập, cấu trúc, design system, bản đồ bề mặt sửa, ranh giới VietConnect | Any session touching the TWV WordPress site |
docs/wordpress-safety-rules.md | Non-negotiable pre-edit guardrails: 3-layer purge, snippet/CSS/Elementor rules, Playwright QARào chắn bắt buộc trước khi sửa: purge 3 lớp, luật snippet/CSS/Elementor, QA Playwright | Read first before any live WP edit |
docs/INDEX.md | Added routing rows + task router entry for the two new docsThêm dòng định tuyến + router tác vụ cho hai tài liệu mới | Doc discovery |
docs/decisions.md | Appended the 2026-06-12 decision: WP knowledge canonical + safety rules as a gateThêm quyết định 2026-06-12: kiến thức WP chuẩn + luật an toàn làm cửa | Decision log |
AGENTS.md | Added a 'read safety rules before editing TWV WP' pointer blockThêm khối con trỏ 'đọc luật an toàn trước khi sửa WP TWV' | Project instructions, loaded every session |
memory/project_twv_wordpress_safety.md | Cross-session recall of the guardrail + MEMORY.md index lineGợi nhớ xuyên phiên về rào chắn + dòng index trong MEMORY.md | Future sessions, even outside this repo |