[Support] kru-x - wordpress


Kru-x

Recommended Posts

"WordPress is an open source software you can use to create a website, blog, or app."

 

Used it on unraid for years for development, but also works fine in production, The only "flaw" that I have found is that the WP instances only see the internal IP address, not the external ones eg. WP can not see the ip address of the remote computer. I know it is a solution but have not found a good one yet (IF anyone do, please let me know)

 

Please use this support for unraid/docker issues/questions only, WordPress itself have a huge community to answer all WordPress related questions.

Edited by Kru-x
Updated
  • Thanks 1
Link to comment

i am new to the unraid forum so if this is in the wrong place or i have any mistakes in this comment but been trying to get this wordpress docker working with nginx/letsencrypt but i cant seem to get/make a working proxy conf file for it. this is what i have come up with so far but i keep getting a 400 bad request error when i go to my (sub)domain

wordpress.subdomain (copy 1).conf

Edited by cutthroat
forgot o say error i got when trying to access (sub)domain
Link to comment
13 minutes ago, cutthroat said:

i am new to the unraid forum so if this is in the wrong place or i have any mistakes in this comment but been trying to get this wordpress docker working with nginx/letsencrypt but i cant seem to get/make a working proxy conf file for it. this is what i have come up with so far but i keep getting a 400 bad request error when i go to my (sub)domain

wordpress.subdomain (copy 1).conf 567 B · 0 downloads

Make life easy for you, use "NginxProxyManager", search for it in "Apps (Community Applications). I guess you have an https://myaddress.com, then in NginxProxyManager just point to the WordPress container's  internal ip adress.

 

Just read your .conf file, have you got WP working internally? Eg. can you connect to it by the internal ip address:port?

Edited by Kru-x
Link to comment
10 minutes ago, cutthroat said:

i can connect to it internally but i accidentally put down in wordpress that the was my duckdns.org domain, so it cant connect to it any more interally

That can be changed in wp.config, if it is a site you have worked on, if not just remove the appdata/wordpress and restart the container it again = new install. And are you using 80 as a port, you have that in your .conf file? It is usually used by unraid UI

Link to comment

the error i get is this when going to my duckdns.org for wordpress is

 

Bad Request

Your browser sent a request that this server could not understand.

Additionally, a 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.4.38 (Debian) Server at 172.18.0.2 Port 80

Link to comment
Just now, cutthroat said:

the error i get is this when going to my duckdns.org for wordpress is

 

Bad Request

Your browser sent a request that this server could not understand.

Additionally, a 400 Bad Request error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.4.38 (Debian) Server at 172.18.0.2 Port 80

 

2 minutes ago, cutthroat said:

proxy_pass http://$upstream_wordpress:80;
every other subdomain.conf file used the port that the docker used inside (rather than what you change it to), so i just did the same in the .conf file i made there

 

Are you using "Unraid" as a server?

Link to comment
8 minutes ago, cutthroat said:

this server was built my dad and he gave it to me once he got a better one and he recommended for me to use unraid so i did

Smart man your dad :-),  download the docker NginxProxyManager and try it from there first, if you can connect internally you should easily connect to it from within NPM, you add your external domain and proxy it to your internal IP address by add a new proxyhost.

 

And remember that most data added to WP is saved in the database, so if settings like your domain you added is still causing problem also delete the MariaDB files when reinstalling.

Edited by Kru-x
Link to comment
1 minute ago, cutthroat said:

unraid is on 192.168.1.15 and i don't use the icons i type the address into my search bar or use a bookmark (and the bookmarks pointed towards http://192.168.1.15:8091)

In that case it should take you to the wordpress install, guess it is the DB so in appdata/ delete the folder "wordpress" and the folder "MariaDB" or whatever you named your db installation to.  Reinstall all and when you have it working to connect to it internally try yo connect as per above (NginxProxyManager). Don't even bother to do the wordpress installation until your external connection is working, so when you can connect to WP externally then start the WP installation and use your DuckDNS address

Link to comment

Hi Kru-x, thanks for your work on this project. I have been looking for a simple way to spin up a wordpress install for a while. Is there any easy way to specify the DB name during setup? I would like to run multiple instances, but I can't unless I can specify the DB name or a prefix.

Thanks again!

Edited by HorizonDev
Link to comment
15 hours ago, HorizonDev said:

Hi Kru-x, thanks for your work on this project. I have been looking for a simple way to spin up a wordpress install for a while. Is there any easy way to specify the DB name during setup? I would like to run multiple instances, but I can't unless I can specify the DB name or a prefix.

Thanks again!

With containers it is dead easy, just fire one up or as many as you like, if you don't want to have it anymore just toss it away and make another one.

As for the DB question:

There is a few ways, just create a new MariDB container and name it differently, then start a new WP container with another name in the template. Eg just do the same as the first one you did but both container with different names (and off course with different :port).

You technically could use the same DB for all different WP instances but I would not recommend it if you don't have a good reason for it. To do, just leave the DB field blank in the WP container template, then at startup you would be presented with WP installation guide, there you can choose where the DB is going to be and what name of the DB you would like. The default is the catching name "wordpress" 🙂

Hope it explains!

Edited by Kru-x
Link to comment

I feel like a total nitwit, but I can't get this to work. I installed MariaDB with default settings. Then I installed Wordpress with default settings. Then when I open the WP webgui, I get "Error establishing a database connection".

 

What do I need to do to get this working? I know how to install Wordpress itself, I'm just not seeing the initial WP setup screen.

 

Never mind, fixed it. I needed to set the path to the MariaDB with the right port in the WP docker settings. Working now!

Edited by lococola
Link to comment
  • 2 weeks later...

Hi! I have an issue with this, and the PHP Max upload size. I have a Wordpress plugin I need to install, but it won't let me because it exceeds the PHP Max upload size (2MB). I saw some posts online regarding this issue, but they all went straight over my head.

 

Any quick and easy way to change the PHP.ini of my existing Wordpress docker container? Perhaps editing the run command when the docker container starts?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.