[Support] kru-x - wordpress


Kru-x

Recommended Posts

4 hours ago, ingarb said:

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?

Hi Ingarb,

 

This is a common problem and not a specific problem to docker or unraid, it is tons of information online how to rectify this problem. There is several solutions, an easy one upload the plugin manually (just unzip the plugin and toss the folder in to your wp-content/plugin folder).

 

You should keep away from change anything in the container as any changes will be deleted each time you update it and even if you could "link" the file to the outside you are in for trouble. Don't even know if the file is in the container, but you could always poke around by ssh in to it.

You are looking for a solution in the wrong place, it is an easy one and several of them, one i think I have used is to add command in to the .htaccess file.

 

Kru-x

  • Like 1
Link to comment
  • 2 weeks later...

Hello,

 

I am trying to use the wordpress docker along with the MySQL docker. I get an error when wordpress starts stating there is an issue with the authentication.

[19-Mar-2020 06:18:07 UTC] PHP Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22

[19-Mar-2020 06:18:07 UTC] PHP Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in Standard input code on line 22


MySQL Connection Error: (2054) The server requested authentication method unknown to the client


WARNING: unable to establish a database connection to '10.0.0.104:3306'

continuing anyways (which might have unexpected results)

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.102. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.102. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 19 01:18:07.772567 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.15 configured -- resuming normal operations
[Thu Mar 19 01:18:07.772606 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

 

Appreciate any help.

Link to comment
13 hours ago, epodox said:

Hello,

 

I am trying to use the wordpress docker along with the MySQL docker. I get an error when wordpress starts stating there is an issue with the authentication.


[19-Mar-2020 06:18:07 UTC] PHP Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22

[19-Mar-2020 06:18:07 UTC] PHP Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in Standard input code on line 22


MySQL Connection Error: (2054) The server requested authentication method unknown to the client


WARNING: unable to establish a database connection to '10.0.0.104:3306'

continuing anyways (which might have unexpected results)

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.102. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.102. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 19 01:18:07.772567 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.15 configured -- resuming normal operations
[Thu Mar 19 01:18:07.772606 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

 

Appreciate any help.

I'm not sure about MySQL as I never used it myself but it should work similar, guess you have a reason for it? Else I would recommend the mariaDB. It is usually a permission problem as this links suggests: https://stackoverflow.com/questions/50026939/php-mysqli-connect-authentication-method-unknown-to-the-client-caching-sha2-pa .

 

Are you adding the MySQL DB container in the template?  Is the Database in MySQL named 'wordpress"? Have WordPress full read and write access?

 

I would try to leave the all the DB parameters blank in the template, then login to MYSQL manually and create the DB, Username, password & permission manually. If the parameters are blank in the template the WordrPess installation would ask for the connection parameters.

 

Hope it helps,

Kru-x

Link to comment

Hi Again Kru,

 

Sorry to keep bothering you. 

 

I switched over to MariaDB and am able to connect to the DB. But now I get the following error in the docker logs and still cant load the setup page:

 

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.104. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.104. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 19 19:22:58.900905 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.15 configured -- resuming normal operations
[Thu Mar 19 19:22:58.900935 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

 

Edited by epodox
Link to comment
On 3/20/2020 at 10:25 AM, epodox said:

Hi Again Kru,

 

Sorry to keep bothering you. 

 

I switched over to MariaDB and am able to connect to the DB. But now I get the following error in the docker logs and still cant load the setup page:

 


AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.104. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.0.0.104. Set the 'ServerName' directive globally to suppress this message
[Thu Mar 19 19:22:58.900905 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.15 configured -- resuming normal operations
[Thu Mar 19 19:22:58.900935 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

 

Hi Epodox,

 

Sorry for the long delay in answer,

 

The message you see is a normal message as WordPress is working in an enclosed environment of docker, as it says you can suppress the message by global directives (google it). You can  disregard it an not worry about it as it has no affect on how WP is working.

You say that you can't load the setup anyway but it has nothing to do with the above, just try to delete the both folders (WordPress & mariaDB) and start from the beginning making sure you have the right address and ports.

 

Hope it helps,

Kru-x

Link to comment
  • 3 weeks later...

Hi all, how do I get this Wordpress docker to work with NPM correctly, I don't seam to be able to get the SSL working correctly. I have changed the external port for Wordpress to 28080 and points still to the container port of 80.

 

if I enable things in the SSL tab, the site stops working.. from the following what would I need to change, also does something in the wp config require changing?

 

1331987334_Screenshot2020-04-09at10_44_40.thumb.png.36e5b157ea41d30c1be1cb396639b486.png

 

 

1821821280_Screenshot2020-04-09at10_44_32.thumb.png.b35ce7eb7b9299e75dfc644321ef8cda.png

 

 

Link to comment
15 minutes ago, Lee B said:

Hi all, how do I get this Wordpress docker to work with NPM correctly, I don't seam to be able to get the SSL working correctly. I have changed the external port for Wordpress to 28080 and points still to the container port of 80.

 

if I enable things in the SSL tab, the site stops working.. from the following what would I need to change, also does something in the wp config require changing?

 

1331987334_Screenshot2020-04-09at10_44_40.thumb.png.36e5b157ea41d30c1be1cb396639b486.png

 

 

1821821280_Screenshot2020-04-09at10_44_32.thumb.png.b35ce7eb7b9299e75dfc644321ef8cda.png

 

 

Hi,

 

Have you forwarded the port 433 in you router to the https port in NPM? Did you do a clean install of WP where it uses your HTTPS address?

Kru-x

 

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

Hi,

 

Have you forwarded the port 433 in you router to the https port in NPM? Did you do a clean install of WP where it uses your HTTPS address?

Kru-x

 

Hi, 

 

Yes the 443 port is forwarded, my other proxy working ok,

I was reading another post about that further back in the thread, so I did just that and installed via eg: https://siteaddress.com 

 

During me trying to get this to work correctly I hit the cert limits :) opps

Link to comment
1 minute ago, Lee B said:

Hi, 

 

Yes the 443 port is forwarded, my other proxy working ok,

I was reading another post about that further back in the thread, so I did just that and installed via eg: https://siteaddress.com 

 

During me trying to get this to work correctly I hit the cert limits :) opps

Happens to us all ;-), you could fiddle around with wp-config but I find it easier to start from the beginning as it seems like u did. It should work when you can create a new cert, if not reach out again and ill try to help.

kru-x 

Link to comment
On 4/9/2020 at 11:21 AM, Kru-x said:

Happens to us all ;-), you could fiddle around with wp-config but I find it easier to start from the beginning as it seems like u did. It should work when you can create a new cert, if not reach out again and ill try to help.

kru-x 

I have sorted this issue out for now, but I have a new one where I can not get the max upload size passed 128m? any ideas?

Link to comment
2 hours ago, Lee B said:

I have sorted this issue out for now, but I have a new one where I can not get the max upload size passed 128m? any ideas?

Glad you figured it out, but I can't figure out how any one would need to upload more than that 128Mb at a time. 🙂 Kidding, assume you have your reasons, and I guess you changed the upload file size in httacess or something.

 

I am not sure about that, if not WP it can only be Nginx, I know in NPM you can add directive directly in the form. MaxUploadFileSize maybe!

 

Kru-x

Link to comment
10 hours ago, Kru-x said:

Glad you figured it out, but I can't figure out how any one would need to upload more than that 128Mb at a time. 🙂 Kidding, assume you have your reasons, and I guess you changed the upload file size in httacess or something.

 

I am not sure about that, if not WP it can only be Nginx, I know in NPM you can add directive directly in the form. MaxUploadFileSize maybe!

 

Kru-x

Ok will have a look, I'm also getting a Gateway 504 error every now and again, any idea what could cause this?

Link to comment
8 hours ago, Lee B said:

Ok will have a look, I'm also getting a Gateway 504 error every now and again, any idea what could cause this?

I'm running out of ideas, a 504 error is a slow "server" error or no response, might be Nginx, have you changed a lot in NPM? Else I don't know, all the ones I have done I have never run in to a 504 error. I use docker on my laptop as well and it works mint, so doubt that it would be docker slowing it down. Sorry I'm in the dark on that one! Reinstall???

Link to comment
  • 4 weeks later...

Hello,

I'm trying to get the thing working but I've encountered a Problem.

 

As suggested I've started the installation of WORDPRESS after creating the SSL Cert and the ReverseProxy Setting.

So far so good - BUT when I get to the WordPress page - I get the warning from the browser that NOT ALL CONTENT IS SECURE - and this lead to:

a) strange display of the page

b) untrusty website.

 

Also if someone has a "step by step" to configure HTTPS on Wordpress in this constellation - I would really appreciate it 🙂 (I'm using Nginx Proxy Manager )

Edited by TDA
Link to comment

Tried this docker tonight but dont know if im stupid, if there is something wrong in the container or my unraid.

I setup MariaDB with the ip and port ...11:3309 (tried both host network and br1)
During Wordpress docker installation i choose network br1 with the ip of ...12
Also during the setup i have tried several different container ports, both 8080 and 443.
The funny thing is, even if a choose 8080 or 443, the "webui" link on the docker image always open the site with :8080.
The other funny thing is, even if i choose 8080 or 443, the port mapping is always 80.

 

And then the other problem, when i open the site with port 80, i get this error: Error establishing a database connection

So, how is this docker supposed to be installed?

Edited by lusitopp
Link to comment
11 hours ago, lusitopp said:

Tried this docker tonight but dont know if im stupid, if there is something wrong in the container or my unraid.

I setup MariaDB with the ip and port ...11:3309 (tried both host network and br1)
During Wordpress docker installation i choose network br1 with the ip of ...12
Also during the setup i have tried several different container ports, both 8080 and 443.
The funny thing is, even if a choose 8080 or 443, the "webui" link on the docker image always open the site with :8080.
The other funny thing is, even if i choose 8080 or 443, the port mapping is always 80.

 

And then the other problem, when i open the site with port 80, i get this error: Error establishing a database connection

So, how is this docker supposed to be installed?

Hi lusitopp,

 

There is a few issues and none of them is related to the container nor unraid, but we have all been there so don't be alarmed. ;-) 

 

First, the IP address is the physical address to the computer (server) and should not be changed as you have done, most docker containers should be on the same address as your server and should be in "bridged" mode. Only in certain advanced situations a containers IP address  should be changed. To reach a container and if your servers IP address is as mine 192.168.1.100 you just add the :port number at the end for each container.

 

So to reach the WordPress container you should ask for 192.168.1.100:8080 in your browser. All containers have to have different port numbers and that is when you change the 8080 if that is already in use of another container (or unraid), the unraid web interface is on port 80.

 

If you have changed the port number unraid should pick that up when clicking on the Icon but that can also be changed in advanced settings WebUI: and by default it is "http://[IP]:[PORT:8080]/" to automatically be picked up.

 

So install the MariaDB container with port 3306 (default port numbers for DB's in most cases) if not in use, then in the WordPress container where it says WORDPRESS_DB_HOST: add your "server IP":port eg 192.168.1.100:3306 and then WordPress can talk to the DB container. You also have to add DB_user and Password and if you have not changed it in the MariaDB container you can use "wordpress" as the user and the same for password.

 

Then when clicking on the icon it should direct you to 192.168.1.100:8080 and WordPress can talk to the database in the background and you can continue installation and use it locally.

 

PS. do not use 443 as the port, it is used as the SSL port (HTTPS) if you want to reach it from internet and should not be used internally. Remember the port is a internal pointer to a specific container/interface on your server (IP adress) all my containers is in the range of 8000 - 8099.

 

Hope that answer your questions,

Kru-x

 

 

Link to comment

Hi and thanks for your reply!

 

10 hours ago, Kru-x said:

First, the IP address is the physical address to the computer (server) and should not be changed as you have done, most docker containers should be on the same address as your server and should be in "bridged" mode. Only in certain advanced situations a containers IP address  should be changed. To reach a container and if your servers IP address is as mine 192.168.1.100 you just add the :port number at the end for each container.

I understand this, but i think i have enough traffic on eth0, there fore i want to use eth1 (br1) for several dockers.

I did not understand that i couldn't just point to another dockers IP on the same br1 interface without advanced configuration. I would have to look into that or use a VM :D

 

10 hours ago, Kru-x said:

If you have changed the port number unraid should pick that up when clicking on the Icon but that can also be changed in advanced settings WebUI: and by default it is "http://[IP]:[PORT:8080]/" to automatically be picked up.

This is not happening. Im trying bridge mode for now, i have changed the port to 8081 since unraid uses 8080, i have also changed to "http://[IP]:[PORT:8081]/" in the advanced settings, but when i click the icon the page is opening on 8080. this must be a bug?

 

10 hours ago, Kru-x said:

So install the MariaDB container with port 3306 (default port numbers for DB's in most cases) if not in use, then in the WordPress container where it says WORDPRESS_DB_HOST: add your "server IP":port eg 192.168.1.100:3306 and then WordPress can talk to the DB container. You also have to add DB_user and Password and if you have not changed it in the MariaDB container you can use "wordpress" as the user and the same for password.

 

Then when clicking on the icon it should direct you to 192.168.1.100:8080 and WordPress can talk to the database in the background and you can continue installation and use it locally.

So i installed MariaDB with default port, i did not change the password, im using bridged mode. port mapping is 172.17.0.2:3306 <-> 192.168.1.100:3306.
I installed wordpress in bridged mode, database ip is set to 192.168.1.100:3306. for user and password i used 'wordpress'.
Portmapping for wordpress is 172.17.0.3:80 <-> 192.168.1.100:8081

When i browse to 192.168.1.100:8081 land at a page telling me: Error establishing a database connection

Link to comment
2 hours ago, lusitopp said:

Hi and thanks for your reply!

 

I understand this, but i think i have enough traffic on eth0, there fore i want to use eth1 (br1) for several dockers.

I did not understand that i couldn't just point to another dockers IP on the same br1 interface without advanced configuration. I would have to look into that or use a VM :D

 

This is not happening. Im trying bridge mode for now, i have changed the port to 8081 since unraid uses 8080, i have also changed to "http://[IP]:[PORT:8081]/" in the advanced settings, but when i click the icon the page is opening on 8080. this must be a bug?

 

So i installed MariaDB with default port, i did not change the password, im using bridged mode. port mapping is 172.17.0.2:3306 <-> 192.168.1.100:3306.
I installed wordpress in bridged mode, database ip is set to 192.168.1.100:3306. for user and password i used 'wordpress'.
Portmapping for wordpress is 172.17.0.3:80 <-> 192.168.1.100:8081

When i browse to 192.168.1.100:8081 land at a page telling me: Error establishing a database connection

 

If you want to use different IP addresses then that is over my head, only had to worried about it ones myself.

 

But if you are trying to bridge them on the same IP then it should work,

 

And sorry, I told you to use wordpress as user and password but forget that, just leave them blank and they defaults to root with blank password. Make sure password in the MariaDB is set to 0 eg blank password, its only if you have changed it and the username you have to add it to the WP container.

 

The problem with "Error establishing a database connection" means that WP is actually talking to the DB but can't login (the above problem).  That it defaults to 8080 is probably a redirection from WordPress, have you ever managed to connect to the installation screen B4?

 

Probably easiest to start from the begining again, delete both folders in your system and reinstall them again,


The basic settings should be as easy as the attached photos.

 

 

Hope it helps,

MariaDB.png

 

WP.png

Edited by Kru-x
Link to comment

 Thx, doing the 'next,next,finish' strategy worked.
When the fields are there, like the user and password, i thought i should enter that 😃

i have on another wierd issue now. I can't access 192.168.1.100:8080 from my pc (that is a vm on unraid). i can access that site from another vm on unraid, from my phone and laptop.🤔

 

 

 

Link to comment
13 minutes ago, lusitopp said:

 Thx, doing the 'next,next,finish' strategy worked.
When the fields are there, like the user and password, i thought i should enter that 😃

i have on another wierd issue now. I can't access 192.168.1.100:8080 from my pc (that is a vm on unraid). i can access that site from another vm on unraid, from my phone and laptop.🤔

 

 

 

Glad it worked, the username and password if you are talking about in the template is there for if you change the DB continers username and password, as you have it now it is using "root" and full access to the DB, not the safest approach in DB's.

 

Sorry I don't follow your setup, you can access it from one VM but not the other on the same server? Dunno,

Link to comment

Hello.
I just wanted to put a pointer out to people who might need it when they can't get it to work.

I've been on this constantly for over 3 hours now.

 

If you're sure your NPM works, then remove mariadb and Wordpress including the files (you can use Krusader for that), then install mariadb and WordPress again.

Just take your time to install and configure everything. Write down, or open a text editor and type IP's, ports, usernames, password and database names down, all information you've created in one way or another, and then slowly progress, and you'll get there.

Link to comment

Hi,

 

Currently moving from my virtualbox vm (ubuntu 18lst, apache, php7, mariadb10xx, wordpress) to a kvm on unraid but I noticed a mariadb docker and new wordpress docker.

 

I might go for the these two dockers. Just question.

The WordPress docker. Does that contain the apache webserver as well - which version of php does is have. I php libs are missing how can we deal with that. Currently installing php as follows:

$ sudo apt update
$ sudo apt -y install software-properties-common
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt update
$ sudo apt -y install php7.4
$ sudo apt -y install php7.4-curl
$ sudo apt -y install php7.4-mbstring
$ sudo apt -y install php7.4-imagick
$ sudo apt -y install php7.4-zip
$ sudo apt -y install php7.4-gd
$ sudo apt -y install php7.4-mysql

If the two dockers give too much hassle I rather stick with a kvm (which is nearly done configuring)

 

I just like the concept of using dockers tho but if it hinders me I'll skip and I don;t have the knowledge how to make my own dockers

 

 

Edited by sjoerd
Link to comment
20 minutes ago, sjoerd said:

Hi,

 

Currently moving from my virtualbox vm (ubuntu 18lst, apache, php7, mariadb10xx, wordpress) to a kvm on unraid but I noticed a mariadb docker and new wordpress docker.

 

I might go for the these two dockers. Just question.

The WordPress docker. Does that contain the apache webserver as well - which version of php does is have. I php libs are missing how can we deal with that. Currently installing php as follows:


$ sudo apt update
$ sudo apt -y install software-properties-common
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt update
$ sudo apt -y install php7.4
$ sudo apt -y install php7.4-curl
$ sudo apt -y install php7.4-mbstring
$ sudo apt -y install php7.4-imagick
$ sudo apt -y install php7.4-zip
$ sudo apt -y install php7.4-gd
$ sudo apt -y install php7.4-mysql

If the two dockers give too much hassle I rather stick with a kvm (which is nearly done configuring)

 

I just like the concept of using dockers tho but if it hinders me I'll skip and I don;t have the knowledge how to make my own dockers

 

 

I'm still new to unRAID and Linux in general, so take my response with a grain of salt.

 

All I did to make it work, was using the Wordpress and mariadb docker, so most things are in the Wordpress docker, and it saves it in the mariadb.

I don't know what version it's using, but accordingly to WhatRuns (Chrome extension), it's this:

image.png.96187e8bf25cd93b6142322ac79ad8c0.png

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.