After installing Yoast Pro and using the “Optimize SEO Data” function, you may encounter an error stating, “Oops, something has gone wrong, and we couldn’t complete the optimization of your SEO data. Please click the button again to re-start the process.” This error is typically caused by invalid previously optimized data or conflicts with other plugins or themes.
It’s important to note that failing to complete the optimization will not negatively impact your search results, as Yoast continues to run optimization processes in the background during content updates. To resolve this issue, consider resetting the optimization to clear any data issues without affecting your SEO efforts.
Contents
Note: Back up your website before making any changes to ensure you can quickly restore it if something goes wrong. Tools like WP Staging make it easy to set up automatic backups. For more guidance, check out the backup and restore guide.
Reset Yoast Data
To reset the data, please follow these steps:
- Install & activate the Yoast Test Helper plugin

- Go to your WordPress admin dashboard > Tools (sidebar) > Yoast Test

- Locate the Yoast SEO section and click on “Reset indexables tables & migrations”, “Reset Prominent words calculation”, and “Reset Internal link counter” buttons. After each click, the page will reload to confirm that each reset was successful.

Rerun Yoast SEO Data Optimization
Now that we have removed any previously stored data, we’ll need to rerun the data optimization. You have a few options to run the SEO data migration:
- Inside the WordPress admin area: This is the default method where you typically encounter the optimization error. It involves running the optimization process directly from the Yoast SEO section within your WordPress dashboard.
- Using WP-CLI commands: This approach is more technical and requires server access through a terminal service. It’s especially recommended for larger sites because it can handle extensive data more efficiently. Your web hosting provider may offer support if you’re not familiar with command-line interfaces.
If the optimization completes successfully after the reset, you are ready to start using Yoast SEO and its features.
Debug JavaScript Errors
If the optimization still fails after resetting, check for JavaScript errors in your browser’s console to identify the issue. For guidance on using the console, see our tutorial on finding JavaScript errors.

There is a list of known error codes here(step 6) with recommended solutions. If the error is not listed or you have questions about the error, please provide Yoast with a screenshot of the error.
Summary of Findings
The most common causes are invalid previously stored data or a conflict with a plugin or theme on your site. The next steps are:
- Reset the optimized data by installing the Yoast Test Helper plugin
- Run the optimization process again
- Check for JavaScript errors with your browser’s console.
- If you see errors, check the known error codes listed here.