Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] kru-x - wordpress

Featured Replies

Hi Friends,

I've installed the Wordpress docker app for UnRAID and was able to migrate my website from Namecheap to my UnRAID home server. I'm able to open the website using my server's local [IP address]:[port] and all the website data seems to have been migrated well.

As a second step, I would like to configure the Wordpress website I created on my local server to be reachable using my registered domain name.

Can anyone suggest what steps I should take to connect between the Wordpress website, Cloudflare and Swag (which I use to create Let's Encrypt SSL certificates)?

Any help will be much appreciated.

 

@Nexius2 maybe you can assist? I read your previous posts in the thread, when you tried to setup swag 🙏

Edited by mjeshurun

  • Replies 470
  • Views 92.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I'm having trouble updating Wordpress. Every time I try to update the website, it asks for FTP credentials. Searching for this issues shows problems with the access rights to the web directory. I've s

  • just did what you said and it is working flawlessly, thank you so much for your help

  • 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 up

Posted Images

11 hours ago, mjeshurun said:

Hi Friends,

I've installed the Wordpress docker app for UnRAID and was able to migrate my website from Namecheap to my UnRAID home server. I'm able to open the website using my server's local [IP address]:[port] and all the website data seems to have been migrated well.

As a second step, I would like to configure the Wordpress website I created on my local server to be reachable using my registered domain name.

Can anyone suggest what steps I should take to connect between the Wordpress website, Cloudflare and Swag (which I use to create Let's Encrypt SSL certificates)?

Any help will be much appreciated.

 

I don't know about Cloudflare or Swag, but I host my personal site using a Wordpress container on UnRAID using Traefik and quic.cloud. For the dynamic domain, I transferred my domain to Google Domains and made the default host as dynamic. My next step is to figure out how to change the container to Wordpress with LiteSpeed.

On 10/24/2022 at 12:58 AM, Eddie Seelke said:

 

I don't know about Cloudflare or Swag, but I host my personal site using a Wordpress container on UnRAID using Traefik and quic.cloud. For the dynamic domain, I transferred my domain to Google Domains and made the default host as dynamic. My next step is to figure out how to change the container to Wordpress with LiteSpeed.

Thanks. I manged to configure my Wordpress instance with the reverse proxy using the NginxProxyManager. For noobs like me, it's simpler to configure than Swag.

Can anyone please explain how to setup a second wordpress instance on the same home server to host a completely different website?

I created a new mariadb database using Adminer, called the database by a new name, created a new user and gave the user a unique password.

I then tried installing the wordpress app again with a different appdata path, container name, and the unique db info I created earlier (db name, db user and db password). The db server info (ip and port) are the same as the first website, but that's the only similarity.

The second instance installs ok, but when I try to open the webui I get the following error message:

 

Error establishing a database connection

 

Am I doing something wrong?

Edited by mjeshurun

Just now, mjeshurun said:

Can anyone please explain how to setup a second wordpress instance on the same home server to host a completely different website?

I created a new mariadb database using Adminer, called the database by a new name, created a new user and gave the user a unique password.

I then tried installing the wordpress app again with a different container name, and the unique db info I created earlier (db name, db user and db password). The db server info (ip and port) are the same as the first website, but that's the only similarity.

The second instance installs ok, but when I try to open the webui I get the following error message:

 

Error establishing a database connection

 

Am I doing something wrong?

Did you also change the appdata path for the new container?

2 minutes ago, Eddie Seelke said:

Did you also change the appdata path for the new container?

Yes, thank you for mentioning this.

I forgot to indicated in my post that I also gave the second wordpress container a unique appdata folder.

9 minutes ago, Eddie Seelke said:

Did you also change the appdata path for the new container?

Do I need to create a second mariadb container with a different appdata folder and port?

1 minute ago, mjeshurun said:

Do I need to create a second mariadb container with a different appdata folder and port?

No, technically you can use the same db user and password as long as you create a new db and give that user permission to read and write it.

20 minutes ago, Eddie Seelke said:

No, technically you can use the same db user and password as long as you create a new db and give that user permission to read and write it.

Hmmm... in that case, I'm not sure why I'm seeing this problem...

  • Author
27 minutes ago, mjeshurun said:

Hmmm... in that case, I'm not sure why I'm seeing this problem...

Hi mjeshurun,

 

My bet it is a DB problem, eg username, permission problem or similar. Try to login to that DB with that username/password with adminer, (not with full admin access)

 

If it works WordPress should work. But I recommend as in many previous posts, not to use the same DB instance, it's easier and less error prone to fire up a second DB container and pair it with the Wordress instance with a different port number.

 

Kru-x

32 minutes ago, Kru-x said:

Hi mjeshurun,

 

My bet it is a DB problem, eg username, permission problem or similar. Try to login to that DB with that username/password with adminer, (not with full admin access)

 

If it works WordPress should work. But I recommend as in many previous posts, not to use the same DB instance, it's easier and less error prone to fire up a second DB container and pair it with the Wordress instance with a different port number.

 

Kru-x

Thanks. In that case I'll just create a second mariadb container.

Should I also create a third db container if I'm going to run Nextcloud?

E.g,

One mariadb container to be used with wordpress site 1

A second mariadb container to be used with wordpress site 2

And a third mariadb container to be used with Nextcloud

 

To each app a different mariadb container?

Edited by mjeshurun

  • Author
1 minute ago, mjeshurun said:

Thanks. In that case I'll just create a second mariadb container.

Should I also create a third db container if I'm going to run Nextcloud?

E.g,

One mariadb container to be used with wordpress site 1

A second mariadb container to be used with wordpress site 2

And a third mariadb container to be used with Nextcloud

 

To each app a different mariadb container?

Yea that's correct,

 

I'll "pair" one MariaDb container for each of my application/container that needs it (and I have 10 of them by now).

 

It might seem like an overkill, but it is little overhead to run a DB container and it is more hassle/error prone to use one container for all. Maybe it is due to my lack of DB knowledge, but when you bugger one up, you are going to be happy that the other ones are running like nothing have happened. Promise!

 

Kru-x

Just my 2 cents, but you don't need to run more than one db container.  I use phpMyAdmin to manage my databases. As long as you make sure the user has all necessary permissions for the database, it should work.

 

I can start a remote session this afternoon, I am CDT time zone, if that would help. Just send me a PM.

3 hours ago, Eddie Seelke said:

Just my 2 cents, but you don't need to run more than one db container.  I use phpMyAdmin to manage my databases. As long as you make sure the user has all necessary permissions for the database, it should work.

 

I can start a remote session this afternoon, I am CDT time zone, if that would help. Just send me a PM.

Hi everyone,

Just want to give a super big Thank You! shout out to @Eddie Seelke that offered to assist me solve the wordpress databases issues I was facing, and actually helped me very patiently and graciously.

People like Eddie remind me that humanity can be great when we share knowledge and help one another.

Thank you so much, Eddie! 🙏🙏🙏
 

Hello again,

I managed to create a second wordpress container for a second website.

However, I am facing a small problem.

When I configure NginxProxyManager to Force SSL for the www subdomain, the website fails to load showing this error message:

1646129143_Screenshot2022-10-29at12_39_02.thumb.png.0c7b8b3c5647800ca517ebca227af949.png

If I disable Force SSL, the website loads using the https URL, but with a browser site info saying that the connection is not fully secure, and uploaded images are now properly displayed:

 

1911827700_Screenshot2022-10-29at13_20_34.png.ad7514c05af62f16d5228ae04cd7b284.png

 

Anyone has an idea how I can fix this?

Edited by mjeshurun

  • 2 weeks later...

Has their been changes to this docker with Cloudflare? Lately all I get with my websites is a white page

Cloudflared docker is throwing many errors.
ERR  error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: x509: certificate is valid for 21178470731dbb32f34cf6950f14c912.7fa6331778a54cb34a30e868165e52de.traefik.default, not jurak.business" cfRay=767068d868f37b19-LAX originService=https://192.168.1.79:18443
2022-11-08T18:35:37Z ERR Failed to handle QUIC stream error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: x509: certificate is valid for 21178470731dbb32f34cf6950f14c912.7fa6331778a54cb34a30e868165e52de.traefik.default, not jurak.business" connIndex=2

  • 2 weeks later...

Where can I find the "php.ini" file?

 

When I try to upload a plugin I get the error message so I wanted to adjust the file:

The uploaded file exceeds the statement upload_max_filesize in php.ini.

Edited by rob1000

  • Author
5 hours ago, rob1000 said:

Where can I find the "php.ini" file?

 

When I try to upload a plugin I get the error message so I wanted to adjust the file:

The uploaded file exceeds the statement upload_max_filesize in php.ini.

Try the .htaccess method, if it is not in your root folder you can add it.

 

Kru-x

  • 3 weeks later...

I have 2 wordpress sites, and had some issues with nginx and certificates, but that is now solved.

One of the wordpress sites functions fine (https://hallum.20ten.nl/), the other one (https://dehef.20ten.nl/) i get a 502 error... they are basically configured the same in nginx and also have the correct A records. Both sites worked fine until the certificate issues started, but these are now renewed, but still, the 2nd site looks like it died?

 

I have no clue how to fix this or what is wrong. Normally, the ONLY way to get into the site (using /wp-admin) was over the actual url https://dehef.20ten.nl/. I can not show the site on my unraid server? Not even when i change to Bridge etc.

 

The only thing i can do is check what is in /mnt/appdata/ for this site.

How can i determine what is wrong? 

What is the actual way to start and run a wordpress site locally?

 

Edited by jowi

Ok, fixed. There were 2 things wrong. First, for some reason the container port (should point to internal 80) was the same as the external port, so e.g. external port 6262 should point to container port 80, but pointed to internal 6262 as well. Could not change it in the docker port settings (greyed out, also after stopping the container), so i had to delete the 'container port' setting and add it again but now properly.

 

Now, the 502 error was gone, but wp showed an error 'something is wrong' and a white screen.

Some googling suggested to rename the plugin folder and try to start the site. That worked :) after that 1 enabled every plugin one by one until i found the culprint, some email form plugin. Deleted it. Site works fine again.

  • 1 month later...

Hey,

 

Ported my test WPress site (was on a ubunut 20.04 vw + mariadb + apache2) to this WP docker container and moved de database to the mariadb container (from lscr.io / linuxserver) repo.. Bit tinkering. Got both containers on a custom network so wordpress can easily see the database). Was quite easy to do  - had to import a sql backup I make earlier.

 

Got some question tho..

 

The container-path points to /var/www/html - which is fine I guess, but also includes the wp-content (which holds the user-data like plugins, themes, uploads). I believe that wp-content should be the only thing on appdata - the rest (imho) should be part of the wordpress image.. I can now temper with the wordpress installation. Normally when you restart the container the container is destroyed and recreated. Could you explain that? What if we receive an updated container?

 

Would it be possible (or even recommended??) to add a volume to /var/www/htlm/wp-content > appdata/wordpress-site1/wpcontent and a link to the /var/www/html/wp-config.php to appdata/wordpress-site1/wp-config.php.

 

Planning on have 3 sites running (test, "live" and an internal which is total different)

 

I mean - that is the power of docker right? - one image, multiple containers with diff settings leaving the same files to the image itself

 

Edit:

Yes - that does actually work - I did not find anything on the official docker hub page but this kind of thing normally works as I've done quirks like this myself with my own dockers. To test it a bit further - I stopped the container, pruned it, removed the image. wp-content stays (ofc it does). Then I reinstalled the container from the template (hooray for unraid to save those templates) and I could just visit the site right away. Did found one weird thing. My "live" site (k1600gt.nl) renders well but the version running from the docker does not render a couple of blocks like it should. I checked - nog weird 404's or php error soooo not sure.. Might be a php8 thing since the live site runs 7.4 something.  The live one and the docker one are exactly the same - i restored a back of the database and content into the dockers and fixed the url's,

image.png.7e132c0be95ded8a8961ceafe6873c33.png

 

image.png.1d613e04aaa7d0c43b5a409e5862fe14.png

 

Edited by sjoerd

  • Author
19 hours ago, sjoerd said:

Hey,

 

Ported my test WPress site (was on a ubunut 20.04 vw + mariadb + apache2) to this WP docker container and moved de database to the mariadb container (from lscr.io / linuxserver) repo.. Bit tinkering. Got both containers on a custom network so wordpress can easily see the database). Was quite easy to do  - had to import a sql backup I make earlier.

 

Got some question tho..

 

The container-path points to /var/www/html - which is fine I guess, but also includes the wp-content (which holds the user-data like plugins, themes, uploads). I believe that wp-content should be the only thing on appdata - the rest (imho) should be part of the wordpress image.. I can now temper with the wordpress installation. Normally when you restart the container the container is destroyed and recreated. Could you explain that? What if we receive an updated container?

 

Would it be possible (or even recommended??) to add a volume to /var/www/htlm/wp-content > appdata/wordpress-site1/wpcontent and a link to the /var/www/html/wp-config.php to appdata/wordpress-site1/wp-config.php.

 

Planning on have 3 sites running (test, "live" and an internal which is total different)

 

I mean - that is the power of docker right? - one image, multiple containers with diff settings leaving the same files to the image itself

 

Edit:

Yes - that does actually work - I did not find anything on the official docker hub page but this kind of thing normally works as I've done quirks like this myself with my own dockers. To test it a bit further - I stopped the container, pruned it, removed the image. wp-content stays (ofc it does). Then I reinstalled the container from the template (hooray for unraid to save those templates) and I could just visit the site right away. Did found one weird thing. My "live" site (k1600gt.nl) renders well but the version running from the docker does not render a couple of blocks like it should. I checked - nog weird 404's or php error soooo not sure.. Might be a php8 thing since the live site runs 7.4 something.  The live one and the docker one are exactly the same - i restored a back of the database and content into the dockers and fixed the url's,

image.png.7e132c0be95ded8a8961ceafe6873c33.png

 

image.png.1d613e04aaa7d0c43b5a409e5862fe14.png

 

Hi sjoerd,

 

I can follow your thinking and I wonder myself, but WordPress updates internally and gets updated on the fly, thus you always have the latest version keeping it like it is. Guess they update the docker container for a new install. I think you get in to more trouble to do it that way, than not.

 

Question back, as I see that you are installing new instances. Do you get a problems in "Site Health" on a new install? Eg. open tools/settings/Site Health and see if you get any recommendations of faults, I have a few pesky ones that I don't know how to solve. like "The REST API encountered an unexpected result" & "your site could not complete a call back", doing my head in!


Regards,

Kru-x

  • Author
19 hours ago, sjoerd said:

Hey,

 

Ported my test WPress site (was on a ubunut 20.04 vw + mariadb + apache2) to this WP docker container and moved de database to the mariadb container (from lscr.io / linuxserver) repo.. Bit tinkering. Got both containers on a custom network so wordpress can easily see the database). Was quite easy to do  - had to import a sql backup I make earlier.

 

Got some question tho..

 

The container-path points to /var/www/html - which is fine I guess, but also includes the wp-content (which holds the user-data like plugins, themes, uploads). I believe that wp-content should be the only thing on appdata - the rest (imho) should be part of the wordpress image.. I can now temper with the wordpress installation. Normally when you restart the container the container is destroyed and recreated. Could you explain that? What if we receive an updated container?

 

Would it be possible (or even recommended??) to add a volume to /var/www/htlm/wp-content > appdata/wordpress-site1/wpcontent and a link to the /var/www/html/wp-config.php to appdata/wordpress-site1/wp-config.php.

 

Planning on have 3 sites running (test, "live" and an internal which is total different)

 

I mean - that is the power of docker right? - one image, multiple containers with diff settings leaving the same files to the image itself

 

Edit:

Yes - that does actually work - I did not find anything on the official docker hub page but this kind of thing normally works as I've done quirks like this myself with my own dockers. To test it a bit further - I stopped the container, pruned it, removed the image. wp-content stays (ofc it does). Then I reinstalled the container from the template (hooray for unraid to save those templates) and I could just visit the site right away. Did found one weird thing. My "live" site (k1600gt.nl) renders well but the version running from the docker does not render a couple of blocks like it should. I checked - nog weird 404's or php error soooo not sure.. Might be a php8 thing since the live site runs 7.4 something.  The live one and the docker one are exactly the same - i restored a back of the database and content into the dockers and fixed the url's,

image.png.7e132c0be95ded8a8961ceafe6873c33.png

 

image.png.1d613e04aaa7d0c43b5a409e5862fe14.png

 

And after reading your post thoroughly :~(): the container only copies the files the first time to the folder, any subsequent restart docker leaves the existing files and only adds files missing, thus if something changes in the file docker will not override it. But then as you said you should leave all file AS IS except for the wp_content, so you have a point.

 

The read and write access will be different in the container and WordPress wouldn't be able to update the files internally so the internal update would not work, you would have to wait until the container is updated I believe, so you would most likely get in to heaps of problems and I wouldn't recommend it, but then I am not an expert so I could be wrong.

 

Kru-x

Edited by Kru-x

Hi I have an issue where I get "Cannot select database". I'm using a second instance of mariadb from linux server (other one is being used by nextcloud). I'm not sure what the issue is as it says the username and password are correct but that it can't access the database still. Thanks in advance. sorry If I'm just doing something dumb.


http://192.168.1.1:8081/wp-admin/

2105168838_Screenshot2023-02-06035416.jpg.d5bc5a74a11e12fb42c51dc18ac03469.jpg

wordpress setup

902501439_Screenshot2023-02-06035441.thumb.jpg.3eace5e27d2df3f1576de4f067f55ee7.jpg

mariadb setup

1790671580_Screenshot2023-02-06035512.thumb.jpg.61270758acc5ebab720bb6b2de55d838.jpg

  • Author
57 minutes ago, Kronos_ said:

Hi I have an issue where I get "Cannot select database". I'm using a second instance of mariadb from linux server (other one is being used by nextcloud). I'm not sure what the issue is as it says the username and password are correct but that it can't access the database still. Thanks in advance. sorry If I'm just doing something dumb.


http://192.168.1.1:8081/wp-admin/

2105168838_Screenshot2023-02-06035416.jpg.d5bc5a74a11e12fb42c51dc18ac03469.jpg

wordpress setup

902501439_Screenshot2023-02-06035441.thumb.jpg.3eace5e27d2df3f1576de4f067f55ee7.jpg

mariadb setup

1790671580_Screenshot2023-02-06035512.thumb.jpg.61270758acc5ebab720bb6b2de55d838.jpg

Have you given the user "wordpress" full read and write access to the "wordpress" db in mariadb? Sounds like you haven't, 

 

Kru-x

 

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.