{"id":20811626,"url":"https://github.com/alexy-os/wordpress-headless-graphql","last_synced_at":"2026-02-01T21:02:38.016Z","repository":{"id":262783479,"uuid":"887886685","full_name":"alexy-os/wordpress-headless-graphql","owner":"alexy-os","description":"A minimal WordPress theme designed to work as a headless CMS with GraphQL support and enhanced security features","archived":false,"fork":false,"pushed_at":"2025-12-15T20:57:15.000Z","size":23156,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-18T14:02:31.131Z","etag":null,"topics":["graphql","graphql-wordpress","headless-cms","headless-wordpress","safety-wordpress","wordpress","wordpress-auth","wordpress-headless","wordpress-headless-theme","wordpress-theme"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexy-os.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-13T13:06:07.000Z","updated_at":"2025-12-15T20:57:19.000Z","dependencies_parsed_at":"2024-11-14T09:24:12.421Z","dependency_job_id":"a801b5a2-0e32-4bcb-b9e9-ed5cc8a24105","html_url":"https://github.com/alexy-os/wordpress-headless-graphql","commit_stats":null,"previous_names":["alexy-os/wordpress-headless-graphql"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/alexy-os/wordpress-headless-graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fwordpress-headless-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fwordpress-headless-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fwordpress-headless-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fwordpress-headless-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexy-os","download_url":"https://codeload.github.com/alexy-os/wordpress-headless-graphql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexy-os%2Fwordpress-headless-graphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28990694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T20:57:35.821Z","status":"ssl_error","status_checked_at":"2026-02-01T20:57:29.580Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","graphql-wordpress","headless-cms","headless-wordpress","safety-wordpress","wordpress","wordpress-auth","wordpress-headless","wordpress-headless-theme","wordpress-theme"],"created_at":"2024-11-17T20:45:29.618Z","updated_at":"2026-02-01T21:02:38.010Z","avatar_url":"https://github.com/alexy-os.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Headless Theme with Enhanced Security\n\nA minimal WordPress theme designed to work as a headless CMS with GraphQL support and enhanced security features. This theme serves as a backend for JAMstack applications.\n\n## 🚀 Quick Start with WP-CLI\n\nFor fast setup and management, see our [WP-CLI documentation](docs/README.md):\n\n- **[Quick Setup Script](docs/quick-setup.sh)** - Automated installation\n- **[WP-CLI Guide](docs/wp-cli-guide.md)** - Complete usage manual\n- **[Examples](docs/wp-cli-examples.md)** - Command examples\n- **[Checklist](docs/quick-start-checklist.md)** - Step-by-step setup guide\n\n## Features\n\n### Headless Mode\n- Disabled frontend rendering\n- Optimized for GraphQL content delivery\n- Minimal theme structure\n- Cleaned up WordPress head and removed unnecessary features\n\n### Security Implementation\n\n#### Admin Protection\n- Custom login page through `/console/` endpoint\n- Disabled standard wp-login.php\n- Protected wp-admin access\n- Implemented security headers\n- Disabled file editing in admin panel\n\n#### Console Authentication\n- Hash-based temporary login links\n- Rate limiting protection:\n  - 5 attempts per hour per IP\n  - 3 attempts per temporary link\n  - 30 minutes link expiration\n- Brute force protection\n- Access logging\n- Session management\n\n#### API Security\n- Protected REST API endpoints\n- GraphQL access control\n- Disabled XML-RPC\n- Disabled directory browsing\n- Protected sensitive files\n\n### GraphQL Integration\n- Configured for WPGraphQL with MYGraphQL extension\n- Selective field exposure for optimal data transfer\n- Custom post type handling with meta fields control\n- Structured content delivery with caching\n- API endpoint protection\n\n## Installation\n\n1. Clone this repository to your server:\n```bash\ncd /www\ngit clone [repository-url] .\n```\n\n2. Add the following constants to your wp-config.php:\n```php\ndefine('WP_ADMIN_PROTECTION', true);\ndefine('CUSTOM_LOGIN_PATH', 'console');\ndefine('DISALLOW_FILE_EDIT', true);\ndefine('DISALLOW_FILE_MODS', true);\n```\n\n3. Add the security rules to your .htaccess:\n```apache\n# Protect wp-login.php and wp-admin\n\u003cIfModule mod_rewrite.c\u003e\n    RewriteEngine On\n    RewriteBase /\n    RewriteRule ^wp-login\\.php$ - [R=403,L]\n    RewriteCond %{REQUEST_URI} ^/wp-admin\n    RewriteCond %{HTTP_COOKIE} !wordpress_logged_in_ [NC]\n    RewriteRule ^(.*)$ - [R=403,L]\n\u003c/IfModule\u003e\n```\n\n## Usage\n\n### Accessing Admin Panel\n1. Navigate to `/console/`\n2. Get a temporary login link\n3. Use the link within 30 minutes\n4. Login with your WordPress credentials\n\n### GraphQL simple queries\nThe GraphQL endpoint is available at `/graphql`. Example query:\n```graphql\nquery GetPosts {\n  posts {\n    nodes {\n      id\n      title\n      content\n    }\n  }\n}\n```\n\n### GraphQL Usage with Field Restrictions\n\nThe GraphQL endpoint is available at `/graphql`. Example optimized query with controlled field exposure:\n\n```graphql\n{\n  pages(first: 10) {\n    nodes {\n      id\n      title\n      featuredImage {\n        node {\n          id\n          sourceUrl\n          altText\n        }\n      }\n      # Only exposed meta fields will be available\n      pageFields {\n        key\n        value\n      }\n    }\n  }\n}\n```\n\n### Field Control\nThe MYGraphQL plugin allows you to:\n- Explicitly define which meta fields are exposed\n- Cache frequently accessed data\n- Control featured image exposure\n- Implement type-specific field restrictions\n\n### Security Features\n- Rate limiting is implemented at both IP and attempt levels\n- All login attempts are logged in `/console/access.log`\n- Security headers are automatically added to all responses\n- Admin area is protected from unauthorized access\n\n## File Structure\n```\nwww/\n│── console/\n│   └── index.php      # Custom login implementation\n├── wp-content/\n│   ├── themes/\n│   │   └── headless-theme/       # Headless Theme\n│   └── plugins/\n│       └── mygraphql/            # GraphQL field control plugin\n├── wp-config.php\n└── .htaccess\n```\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexy-os%2Fwordpress-headless-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexy-os%2Fwordpress-headless-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexy-os%2Fwordpress-headless-graphql/lists"}