[MPG] Encountering 404 – Page Not Found

The Multiple Pages Generator is a WordPress plugin for the bulk creation of pages, even unlimited pages.
However, if your URL is showing as a 404 Error – Page Not Found, here’s a checklist to fix it:
1. Sometimes it happens after upgrading to the new version, so deactivate the plugin (without cancelling the license, if any) and activate it again
2. Make sure that the MPG plugin is properly installed; the CSV source file is loaded, and the template is properly set.
3. Check if the requested URL doesn’t belong to an existing page, especially in the trash folder.
4. Check if the requested URL is identical to the one included in the data file uploaded to the MPG plugin.
5. Make sure to disable any custom 404-page plugins. Sometimes they check the page URL in the database before MPG does and return as 404.
6. Also, check for these most common problems that cause 404 Error:
a.Unsupported characters in a column used as a shortcode for URL generation.
b.Use of “Plain” permalink structure under Settings > Permalinks.
c. Conflict with another plugin
MPG supports multi-sites and multi-language setups, though specific plugins might not be supported.
Caching/Optimization Purges (Uploaded Files Only)
If your MPG project uses an uploaded CSV or Excel file as its data source (rather than a Google Sheets URL), 404 errors can appear after caching or database-optimization routines run on your site. This happens because these operations can delete or clear the wp-content/mpg-uploads/ directory (or its associated WordPress transients), which removes the index.json file that MPG relies on to serve the generated pages.
Note: Projects connected to a Google Sheets URL are not affected in the same way because MPG can re-fetch the data automatically. Uploaded-file projects do not have an equivalent auto-recovery mechanism, so the fix must be applied at the caching/optimization layer.
Why this happens
Caching plugins and optimization tools often perform aggressive cleanup routines that may:
- Purge the
wp-content/mpg-uploads/directory or its contents as part of a media/upload cleanup. - Flush WordPress transients that MPG uses to track uploaded project data.
When index.json is removed from wp-content/mpg-uploads/<project-id>/, MPG can no longer map incoming URLs to generated pages, causing a 404 for every visitor.
Re-uploading the file restores pages temporarily, but the 404s will recur the next time the cleanup runs.
How to diagnose
Using a file manager (e.g., your host's File Manager or an FTP client), navigate to:
wp-content/mpg-uploads/<your-project-id>/Check whether index.json is present. If the file is missing, a recent caching or optimization purge is the likely cause.
How to fix
Exclude wp-content/mpg-uploads/ from all cleanup routines in your caching and optimization plugins:
WP Rocket
- Go to WP Rocket → Settings → File Optimization (and/or Media).
- Add
wp-content/mpg-uploadsto any exclusion lists for file cleanup or CDN. - Go to WP Rocket → Settings → Advanced Rules and add
wp-content/mpg-uploads/to the Never Cache URL(s) field if applicable.
WP-Optimize
- Go to WP-Optimize → Database and review the Transients cleanup options.
- Disable automatic transient deletion or configure it to exclude MPG transients.
- Under WP-Optimize → Cache → Exclusions, add
wp-content/mpg-uploads/to ensure the directory is not purged.
Other caching or optimization plugins Look for settings labelled "Excluded files/directories", "Safe-list", or "Do not delete" and add wp-content/mpg-uploads/ there.
After applying the exclusion, re-upload your CSV/Excel file once to regenerate index.json, and the 404 errors should stop recurring.
