• I have a self hosted WordPress in a Google Cloud Virtual Machine. I am trying to add a media/image to a post. When I try to add the image, I will receive an error shown below. However, it does not happen when I add other media such as .pdf.

    POST?https://philsa.gov.ph/wp-admin/admin-ajax.php?403 (Forbidden)

    I tried using an inline image block, and tries inserting an image found on web. This can be added to the post. However, when saving the draft or publishing it, I will receive another 403 (Forbidden) error, this time in admin-post.php shown below.

    POST https://philsa.gov.ph/wp-admin/post.php 403 (Forbidden)

    I have posted this on WordPress Stack Exchange as well if you are interested in the images: https://wordpress.stackexchange.com/questions/425430/cannot-add-image-png-jpeg-etc-but-can-add-pdf-403-forbidden-when-posting

    The solutions I tried so far with no avail.

    1. Changing the permissions of wp-admin with chmod 755.
    2. Clearing my browser cache. The self hosted WP does not have a plugin for cache.
    3. Deleting the .htaccess removed the accessibility to the admin page. The page returns 404.

    Version: WordPress 6.3.4

Viewing 1 replies (of 1 total)
  • Deactivate all plugins as a test and switch to a standard theme such as TwentyTwentyFour. Does it work then? If so, then activate the plugins one by one and then change the theme again until you have found the culprit.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.