WordPress on OpenWrt

Finally I got created OpenWrt web server using WordPress
I changed the router to wxr-1900dhp. Thank you for many advices before.
My site is (https://taroumaru52.com/)

My Site health is good but still I have 2 problem.

One is the REST API encounterd an unexpected result.

The REST API call gave the following unexpected result: (401) {"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit posts in this post type.","data":{"status":401}}.

Without classic editor plugin,I cannot add any posts.
How can I solve Rest API problem?

The other is I cannot install optional module, imagick.
Have you ever installed imagick on OpenWrt?

I installed the following PHP modules
php7 php7-cgi php7-cli php7-fastcgi php7-mod-curl php7-mod-dom php7-mod-exif php7-mod-fileinfo php7-mod-json php7-mod-mbstring php7-mod-mysqli php7-mod-pdo php7-mod-pdo-mysql php7-mod-pdo-sqlite php7-mod-session php7-mod-xml php7-mod-simplexml php7-mod-gd php7-mod-opcache php7-mod-zip php7-mod-iconv php7-mod-filter php7-mod-bcmath

Also Shoud I install apache or nginx instead of uhttpd?
I afraid uhttpd can be a security hole even using cloudflare.

1 Like

In the past, I used nginx for wordpress on openwrt, because of size and fine grained configuration.

Hi, Reinerotto.
How is the performance in nginx?
I think it's better choice.
I will try it.

It's too difficult to set up nginx on OpenWrt.
Finally I set up nginx on OpenWrt.
Its very good performance as router.
I changed the router to WXR-2533DHP
I solved Rest API Problem.
Uhttpd cannot handle wp-json. but Nginx can do it.
Now I can edit the post on Gutenberg without classic editor plugin.

I add

try_files $uri $uri/ /index.php$is_args$args;

on the server block.


Interested in the WordPress on OpenWrt Blog you built! Hope to see a detailed tutorial article on setting up the environment on your router website (Nginx + PHP7 + MariaDB)

@taroumaru same here. I would be very interested in the setup, if you can describe it a little bit please?

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.