# WordPress vs Drupal: source lines of code compared

The WordPress vs Drupal comparison on OctoCounts shows side-by-side source line counts for WordPress/WordPress and drupal/drupal, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-20, WordPress/WordPress contains 1,214,174 total lines (781,556 code) across 3,853 files, while drupal/drupal contains 868,886 total lines (460,880 code) across 8,678 files as of 2026-09-15. WordPress/WordPress is about 1.7x the size of drupal/drupal by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [WordPress/WordPress](https://octocounts.com/github/WordPress/WordPress) | [drupal/drupal](https://octocounts.com/github/drupal/drupal) |
| --- | ---: | ---: |
| Files | 3,853 | 8,678 |
| Total lines | 1,214,174 | 868,886 |
| Code lines | 781,556 | 460,880 |
| Comment lines | 299,267 | 319,344 |
| Blank lines | 133,351 | 88,662 |
| Languages counted | 10 | 12 |

Top languages in WordPress/WordPress: PHP (47.1% of code), CSS (21.5% of code), JavaScript (18.5% of code). Top languages in drupal/drupal: PHP (63.7% of code), CSS (14.4% of code), YAML (10.1% of code). PHP, CSS, JavaScript appear in both top language lists; JSON, Sass appear only in WordPress/WordPress's top languages; YAML, Twig appear only in drupal/drupal's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. WordPress/WordPress was counted at ref master (commit 5ed0dea06d1f) on 2026-09-20; drupal/drupal was counted at ref b9b3d5914c6f570138853f2f9cb1d214c4de9cb7 (commit b9b3d5914c6f) on 2026-09-15. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

WordPress/WordPress counts the WordPress core repository — the PHP application core with its bundled default themes, bundled JavaScript, and administration UI assets. drupal/drupal counts the Drupal core repository — the PHP content-management framework with its core modules and bundled assets. Both counts are PHP CMS core trees, counted on the dates shown above.

The per-language tables of both reports show PHP as the dominant counted language, with a visible share of JavaScript for the administrative interfaces and bundled assets — typical of CMS codebases that ship their UI with the core.

Both repositories ship end-user-facing material — default themes, assets, and localization scaffolding — alongside the PHP core, so part of each count is content and presentation rather than application logic.

_Core repository size says nothing about what a real site runs: production WordPress and Drupal sites add themes, modules/plugins, and uploaded content that dwarf the core, and site quality depends on those additions, not on these counts._

Sources: [WordPress/WordPress repository (core with bundled themes)](https://github.com/WordPress/WordPress) · [drupal/drupal repository](https://github.com/drupal/drupal). Statements verified 2026-09-16.

Evidence and next steps:

- [WordPress/WordPress SLOC report](https://octocounts.com/github/WordPress/WordPress)
- [drupal/drupal SLOC report](https://octocounts.com/github/drupal/drupal)
- [Compare WordPress/WordPress and drupal/drupal interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2FWordPress%2FWordPress&right=https%3A%2F%2Fgithub.com%2Fdrupal%2Fdrupal)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, WordPress/WordPress or drupal/drupal?

WordPress/WordPress has more code: 781,556 code lines versus 460,880 for drupal/drupal, about 1.7x as much, based on cached OctoCounts reports as of 2026-09-20.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for WordPress/WordPress, drupal/drupal, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. WordPress/WordPress was counted at ref master (commit 5ed0dea06d1f) on 2026-09-20; drupal/drupal was counted at ref b9b3d5914c6f570138853f2f9cb1d214c4de9cb7 (commit b9b3d5914c6f) on 2026-09-15. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
