LooHood WP Registry grade B. Medium-severity findings · 1 findingWP RegistryMedium-severity findings · 1 findingOpen the reportB
LooHood WordPress Plugin
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/lukmanbagus/loohood/releases/download/1.1.0/loohood.zip![]()
Features
- ✅ Automatic setup wizard (4 simple steps)
- ✅ Automatically create a private GitHub repository
- ✅ Automatically clone the repository to
/wp-content/uploads/[repo_name] - ✅ Automatically create a "Coming Soon"
index.html, then commit & push - ✅ Automatically create a Cloudflare Pages project
- ✅ Automatically connect GitHub & Cloudflare
- ✅ One-click "Push to Live" from the dashboard
- ✅ Convert all WordPress content (pages & posts) to static HTML
- ✅ Export assets (themes, uploads) alongside pages
- ✅ Minimal configuration — only requires GitHub & Cloudflare tokens
Usage Flow
- Install & Activate plugin
- Setup Wizard opens automatically:
- Step 1: Enter GitHub token
- Step 2: Create a private repo (auto-clone +
index.html+ commit/push) - Step 3: Enter Cloudflare token
- Step 4: Create a Cloudflare Pages project (connected to the repo)
- Push to Live anytime with one click from the dashboard
Requirements
- WordPress 5.0 or newer
- PHP 7.4 or newer
- GitHub Personal Access Token with permissions:
repo,workflow - Cloudflare API Token with permission:
Account > Cloudflare Pages > Edit
Installation
Manual Installation
- Download the plugin (zip) or clone this repository
- Upload the plugin folder to
/wp-content/plugins/ - Activate the plugin via the "Plugins" menu in WordPress admin
- Follow the setup wizard that opens automatically
Plugin Installation
- Create a
.zipfile from the plugin folder - Upload via WordPress admin > Plugins > Add New > Upload Plugin
- Activate the plugin
- Follow the setup wizard that opens automatically
Setup Wizard Details
Step 1: Connect GitHub
Enter a GitHub Personal Access Token with permissions:
repo- Full control of private repositoriesworkflow- Update GitHub Action workflows
How to create a token:
- Open https://github.com/settings/tokens/new
- Select scopes: repo, workflow
- Name the token (example: "LooHood")
- Generate and copy the token
Step 2: Create GitHub Repository
Choose a repository name (default: wp-static-[timestamp]).
The plugin will:
- Create a new private repository
- Clone it to
/wp-content/uploads/[repo_name] - Create an
index.htmlwith "Coming Soon" - Create an initial commit and push it to GitHub
Step 3: Connect Cloudflare
Enter a Cloudflare API Token with permission:
- Account > Cloudflare Pages > Edit
How to create a token:
- Open https://dash.cloudflare.com/profile/api-tokens
- Create token > Custom token
- Permissions: Account > Cloudflare Pages > Edit
- Account Resources: Include > All accounts
- Continue to summary > Create token
Step 4: Create Cloudflare Pages Project
Choose a project name (default: same as the repo name).
The plugin will:
- Create a new Cloudflare Pages project
- Automatically connect it to the GitHub repository that was created
- Generate the live site URL:
https://[project-name].pages.dev
Usage After Setup
Deploy Manual
- Open WordPress admin > Static Exporter
- Click the "Push to Live" button
- The plugin will export and push to GitHub (Cloudflare Pages deploys from GitHub)
- The page will auto-refresh after deployment completes
Links & Configuration
The dashboard shows:
- GitHub Repository: Link to the GitHub repo
- Live Site: Link to the live site on Cloudflare Pages
- Configuration Info: Owner, repo, account ID, project name
Reset & Disconnect
Click "Reset & Disconnect" to:
- Remove all plugin configuration
- Warning: The repository and project created on GitHub & Cloudflare are NOT automatically deleted (delete them manually if needed)
File Structure
loohood-exporter/
├── loohood-exporter.php # Main plugin file
├── uninstall.php # Clean up on uninstall
├── .gitignore # Git ignore rules
├── README.md # Documentation
├── templates/
│ ├── wizard-page.php # Setup wizard page
│ ├── admin-page.php # Main admin page
│ └── settings-page.php # Legacy settings page
└── assets/
├── admin.css # Admin styles
└── admin.js # Admin scripts
Export Location
Static HTML is exported to:
/wp-content/uploads/wp-exporter-result/
Troubleshooting
Setup Wizard Error
GitHub token invalid
- Make sure the token is still valid
- Check permissions: repo, workflow
- Generate a new token if needed
Cloudflare token invalid
- Make sure the token is still valid
- Check permission: Account > Cloudflare Pages > Edit
- Generate a new token if needed
Failed to create repository
- Make sure the GitHub token has
repopermission - Check whether a repository with the same name already exists
Failed to create Cloudflare project
- Make sure the Cloudflare token has
Cloudflare Pages > Editpermission - Check that the Account ID is filled in
Deployment Error
Export failed
- Make sure
/wp-content/uploads/is writable (permission 755) - Check PHP memory limit (256MB minimum recommended)
- Make sure the theme does not produce broken absolute URLs
GitHub push failed
- Verify the GitHub token is still valid
- Make sure the token has the correct permissions
- Check that the repository still exists and is accessible
Cloudflare deployment failed
- Make sure the Cloudflare Pages project exists
- Verify the Cloudflare API token is valid
- Check that the Account ID is correct
- Make sure Cloudflare Pages is connected to the GitHub repository
Files are not exported
- Make sure the post/page status is "publish"
- Check the post is not password protected
- Verify permalink structure in Settings > Permalinks
Customization
Filter Post Types
To change which post types are exported, edit the exportToStatic() method:
$args = [
'post_type' => ['page', 'post', 'product'], // add CPTs
'post_status' => 'publish',
'numberposts' => -1
];
Custom HTML Generation
To customize HTML output, edit the generateStaticHTML() method.
Custom Asset Handling
To customize asset export, edit the exportAssets() method.
Security
- Tokens are stored in the WordPress database (options
loohood_...) - Use HTTPS for WordPress admin
- Do not share tokens publicly
- Keep the plugin updated
- Repositories are created as private
- Tokens should never appear in logs
Uninstall
To uninstall the plugin:
- Deactivate the plugin via the Plugins menu
- Delete the plugin
Note: The GitHub repository and Cloudflare Pages project are not automatically deleted. Delete them manually if needed:
- GitHub: Open repository > Settings > Delete repository
- Cloudflare: Open project > Settings > Delete project
FAQ
Q: Can I use an existing GitHub repository? A: Currently, the plugin only supports creating a new repository. To use an existing repo, edit configuration manually in wp-admin/options.php
Q: Can I use a custom domain on Cloudflare Pages? A: Yes. After setup is complete, you can add a custom domain in the Cloudflare Pages project settings
Q: How often should I deploy? A: Deploy whenever content changes (posts, pages, media). You can also deploy manually anytime from the dashboard
Q: Does it support Cloudflare Workers? A: The current version focuses on Cloudflare Pages. Workers support can be added in a future release
Q: Does it support Cloudflare R2? A: The structure is ready for R2 integration. The feature can be added in a future release
Support & Contribution
For issues or feature requests, open an issue on the GitHub repository.
License
GPL v2 or later
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.