skip to Main Content

My wordpress site looks fine locally and when I deploy it on the GCP server, the home page is working fine but all other pages are giving 404 error. I tried shifting permalinks and updating the htaccess file. But the issue did not resolve. By using index.php in a custom url site is working but still form links are broken.
Can anyone please help me to resolve the issue.

2

Answers


  1. What webserver are you using? For example if it’s Apache, Add RewriteEngine On to your httpd.conf.

    Login or Signup to reply.
  2. 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.

    Can you check and verify the points below :

    • Check permalink settings whether they are correctly configured
      with GCP/ In wordpress admin panel goto settings→permalinks and
      verify the desired structure is selected or not.
    • The recommended permissions for files are 644 and directories should
      have been set to 755.
    • Uninstall all the unwanted plugins; some plugins will conflict with
      themes.
    • You can use index.php to bypass 404 errors but it’s not good as a
      long term solution.
    • As Johnhanely suggested this might be also due to file permissions
      error. Can you check this doc and SO link for more information on file permissions
    • Enable mod_rewrite by following this SO by Jitendra Popat
    • Refer to this Google Cloud Web hosting document.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search