Wordpress REST API Error

Website URL

http://googol.42web.io

Error Message

REST API 是 WordPress 及其他应用与服务器通信的一种途径。例如,区块编辑器页面就依赖 REST API 来显示及保存您的页面和文章。

当测试 REST API 时返回了预期之外的结果:

REST API 端点:http://googol.42web.io/wp-json/wp/v2/types/post?context=edit
REST API 响应:(403) Forbidden

Other Information

This is my config information:

`
### wp-core ###

version: 6.5.4
site_language: zh_CN
user_language: zh_CN
timezone: +00:00
permalink: /%year%/%monthnum%/%day%/%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 1
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /home/vol8_2/infinityfree.com/if0_36733941/htdocs
wordpress_size: 58.40 MB (61240175 bytes)
uploads_path: /home/vol8_2/infinityfree.com/if0_36733941/htdocs/wp-content/uploads
uploads_size: 0.00 B (0 bytes)
themes_path: /home/vol8_2/infinityfree.com/if0_36733941/htdocs/wp-content/themes
themes_size: 14.19 MB (14876118 bytes)
plugins_path: /home/vol8_2/infinityfree.com/if0_36733941/htdocs/wp-content/plugins
plugins_size: 327.38 KB (335242 bytes)
database_size: 1.31 MB (1371096 bytes)
total_size: 74.22 MB (77822631 bytes)

### wp-active-theme ###

name: Begnas(begnas)
version: 1.0.4
author: ArtifyWeb
author_website: https://artifyweb.com/
parent_theme: none
theme_features: post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, widgets-block-editor, block-templates
theme_path: /home/vol8_2/infinityfree.com/if0_36733941/htdocs/wp-content/themes/begnas
auto_update: 禁用

### wp-themes-inactive (4) ###

Twenty Twelve: version: 4.2, author: WordPress团队, 自动更新已禁用
Twenty Twenty-Four: version: 1.1, author: WordPress 团队, 自动更新已禁用
Twenty Twenty-Three: version: 1.4, author: WordPress 团队, 自动更新已禁用
Twenty Twenty-Two: version: 1.7, author: WordPress 团队, 自动更新已禁用

### wp-plugins-inactive (1) ###

Akismet Anti-spam: Spam Protection: version: 5.3.2, author: Automattic - Anti-spam Team, 自动更新已禁用

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1809
imagemagick_version: ImageMagick 7.1.1-19 Q16-HDRI x86_64 21601 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 30M
upload_max_filesize: 20M
max_effective_size: 20 MB
max_file_uploads: 20
imagick_limits: 
	imagick::RESOURCETYPE_AREA: 122 GB
	imagick::RESOURCETYPE_DISK: 9.22337203685E+18
	imagick::RESOURCETYPE_FILE: 768
	imagick::RESOURCETYPE_MAP: 61 GB
	imagick::RESOURCETYPE_MEMORY: 30 GB
	imagick::RESOURCETYPE_THREAD: 1
	imagick::RESOURCETYPE_TIME: 9.22337203685E+18
imagemagick_file_formats: 3FR, 3G2, 3GP, A, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, B, BAYER, BAYERA, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, C, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, FTXT, G, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K, K25, KDC, LABEL, M, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MPO, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, O, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, QOI, R, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RSVG, RW2, SCR, SCREENSHOT, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, STRIMG, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, Y, YAML, YCbCr, YCbCrA, YUV
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: unknown

### wp-server ###

server_architecture: Linux 5.7.7-362.18.1.el9_5.x86_64 
httpd_software: Apache
php_version: 8.2.16 64bit
php_sapi: apache2handler
max_input_variables: 8000
time_limit: 60
memory_limit: 512M
max_input_time: 60
upload_max_filesize: 20M
php_post_max_size: 30M
curl_version: 7.87.0 OpenSSL/1.1.1w
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: false
current: 2024-06-15T05:45:32+00:00
utc-time: Saturday, 15-Jun-24 05:45:32 UTC
server-time: 2024-06-15T05:45:31+00:00

### wp-database ###

extension: mysqli
server_version: 10.4.17-MariaDB
client_version: mysqlnd 8.2.16
max_allowed_packet: 3145728
max_connections: 200

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/vol8_2/infinityfree.com/if0_36733941/htdocs/wp-content
WP_PLUGIN_DIR: /home/vol8_2/infinityfree.com/if0_36733941/htdocs/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 512M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: 未定义
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable

`

It I known only effert for Theme Widget (Non-block theme), but I changed to block theme.

Please read

3 Likes

please delete this.

So, it may be need a CloudFlare? But I have no any custom domain name.

WordPress Site Health just provides recommendations. If it says something is wrong, it doesn’t mean that your site is broken.

So before you start spending money and jumping through hoops to solve this “issue”, you can also just ignore this message for now and see if it actually causes issues for your site. Because in my experience, most websites work just fine with this limitation.

3 Likes

A post was split to a new topic: WordPress Issue