Cannot add image (png, jpeg, etc.) but can add pdf, 403 forbidden when posting
-
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.
- Changing the permissions of
wp-admin
with chmod 755. - Clearing my browser cache. The self hosted WP does not have a plugin for cache.
- Deleting the
.htaccess
removed the accessibility to the admin page. The page returns404
.
Version: WordPress 6.3.4
- Changing the permissions of
- You must be logged in to reply to this topic.