当更改 WordPress 后台管理面板域名后,站点健康工具提示我 REST API 无法正常工作。因为我用的是经典编辑器和经典小工具,所以这个问题没有给我带来太大影响。不过既然已经知道有问题,我决定还是找一找解决这一问题的办法。幸好,这个问题并不复杂。
Shankang Ke
Fix REST API for WordPress Hosted on Different Domains
After hosting the WordPress admin panel on a different domain, the Site Health tool tells me that REST API isn’t working properly. I use the classic editor and widgets so this problem doesn’t affect me much. But since this problem shows up, I decided to find a fix for it. Luckily, it wasn’t too complicated to solve this problem.
如何更改 WordPress 后台管理面板域名
以本站 “www.draftposts.com” 为例,预期结果是把 WordPress 后台管理面板 (“www.draftposts.com/wp-admin/”) 的域名换成另外一个(比如改成 “admin.draftposts.com/wp-admin/”)。
How to Host wp-admin on a Different Domain
Let’s take this WordPress site “www.draftposts.com” as an example. What we want to achieve is to host the admin panel (“www.draftposts.com/wp-admin/”) on a different (sub)domain (making it “admin.draftposts.com/wp-admin/” for example).