Skip to content

Commit 2a7c8b1

Browse files
authored
Rewrite README.md as a developer/contributor landing page (#1029)
1 parent 58603b3 commit 2a7c8b1

1 file changed

Lines changed: 99 additions & 10 deletions

File tree

README.md

Lines changed: 99 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,109 @@
1-
# super-cache
1+
# WP Super Cache
22

3-
A very fast caching engine for WordPress that produces static html files.
3+
A very fast caching engine for WordPress that produces static HTML files.
44

5-
## How to install super-cache
5+
[![WordPress Plugin](https://img.shields.io/wordpress/plugin/v/wp-super-cache)](https://wordpress.org/plugins/wp-super-cache/)
6+
[![License: GPLv2+](https://img.shields.io/badge/License-GPLv2%2B-blue.svg)](./LICENSE.txt)
7+
[![PHP 7.4+](https://img.shields.io/badge/PHP-7.4%2B-7A86B8.svg)](https://www.php.net/)
8+
[![PHP Tests](https://github.com/Automattic/wp-super-cache/actions/workflows/php-tests.yml/badge.svg)](https://github.com/Automattic/wp-super-cache/actions/workflows/php-tests.yml)
69

7-
### Installation From Git Repo
10+
This plugin generates static HTML files from your dynamic WordPress site. After a file is generated, the web server serves that file directly instead of processing WordPress PHP scripts, dramatically reducing load and response times.
811

9-
## Contribute
12+
For user-facing documentation, see the [WordPress.org plugin page](https://wordpress.org/plugins/wp-super-cache/). For extended documentation, see the [wiki](https://github.com/Automattic/wp-super-cache/wiki).
13+
14+
## Project structure
15+
16+
```
17+
wp-cache.php Main plugin entry point
18+
wp-cache-phase1.php Early-loading caching phase (runs before WordPress)
19+
wp-cache-phase2.php Main caching logic (runs during WordPress init)
20+
advanced-cache.php Drop-in loaded by WordPress when WP_CACHE is enabled
21+
ossdl-cdn.php CDN URL rewriting (OSSDL off-linker integration)
22+
23+
inc/ Core includes (Boost integration, admin UI helpers)
24+
rest/ REST API endpoint classes for cache management
25+
src/ Source modules (device detection)
26+
plugins/ WP Super Cache's own plugin system (loaded early, before WP)
27+
partials/ Admin settings page tab templates
28+
29+
tests/php/ PHPUnit tests
30+
tests/e2e/ End-to-end tests (Docker + Jest)
31+
32+
changelog/ Individual changelog entries (Jetpack Changelogger format)
33+
.phan/ Phan static analysis configuration and stubs
34+
```
35+
36+
## Development setup
37+
38+
### Prerequisites
39+
40+
- PHP 7.4+
41+
- [Composer](https://getcomposer.org/)
42+
43+
### Installation
44+
45+
```bash
46+
composer install
47+
```
48+
49+
### Running tests
50+
51+
```bash
52+
# PHP unit tests
53+
composer test-php
54+
55+
# With coverage
56+
composer test-coverage
57+
```
58+
59+
### Linting
60+
61+
```bash
62+
# PHPCS (WordPress/Jetpack coding standards)
63+
vendor/bin/phpcs
64+
```
65+
66+
### Static analysis
67+
68+
```bash
69+
# Phan
70+
vendor/bin/phan
71+
```
72+
73+
### End-to-end tests
74+
75+
E2E tests use Docker and Jest. See `tests/e2e/` for setup details:
76+
77+
```bash
78+
cd tests/e2e
79+
pnpm install
80+
docker compose up -d
81+
pnpm test
82+
```
83+
84+
## Contributing
85+
86+
1. Branch from `trunk`.
87+
2. Make your changes.
88+
3. Add a changelog entry:
89+
```bash
90+
vendor/bin/changelogger add
91+
```
92+
4. Push and open a pull request against `trunk`.
93+
94+
CI will automatically run:
95+
- **PHP tests** across PHP 8.2, 8.3, 8.4, and 8.5
96+
- **PHPCS linting** on changed lines
97+
- **Changelog validation** (warns if no entry is included)
98+
99+
### Translations
100+
101+
Help translate WP Super Cache on the [WordPress.org translation page](https://translate.wordpress.org/projects/wp-plugins/wp-super-cache).
10102

11-
## Get Help
12-
Support is handled via the .org support forums.
13103
## Security
14104

15-
Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic).
105+
To report a security vulnerability, visit [automattic.com/security](https://automattic.com/security/) or the [HackerOne bug bounty program](https://hackerone.com/automattic).
16106

17107
## License
18108

19-
super-cache is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)
20-
109+
WP Super Cache is licensed under the [GNU General Public License v2 (or later)](./LICENSE.txt).

0 commit comments

Comments
 (0)