Recently, I was trying to play with Wordpress, and found that after years of not seeing it, it is still a bit better, and now in addition to the XML-RPC method, there are other ways to operate, one of which is the REST API, which is natively supported, and I will document this feature here.

This is a photo caption.
| The following is a list of the most important things you can do for your business.

Configuring Nginx

[root@liqiang.io]# cat /etc/nginx/default.d/default.conf
server {
    if (-f $request_filename/index.html){
        rewrite (. *) $1/index.html break;
    if (-f $request_filename/index.php){
        rewrite (. *) $1/index.php;
    if (! -f $request_filename){
        rewrite (. *) /index.php;
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

Restart Nginx

[root@liqiang.io]# nginx -t
[root@liqiang.io]# nginx -s reload

Adding access control

install plugin

configuration plugin


List Publish’s Post interface does not require authentication, so you need to keep that in mind when testing.