WordPress 404 errors usually occur when you have removed certain pages from your website and haven’t redirected them to your live pages. Sometimes, these errors may also occur when you have changed a URL of a specific page. The most common case that you may face is: The course Page will not load and returns a 404 error.
You can fix the error 404 on WordPress by implementing the following solutions:
Set up permalinks as Post name (/%postname%/)
Make sure that Courses are published and not set as Draft:
When the Course is saved as "Draft", it will not appear on the Courses page. If Students have a link for the course it will return 404.
Make a default .htaccess file