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.

Wordpress Docker??

Featured Replies

Using Squid's docker search plugin, I see there are many Wordpress containers out there.  Since WordPress runs most of the web today, I wondered, has anyone attempted to do an unRaid Wordpress Docker that is hardened for opening up to the web.

 

Here is some comments on the official Wordpress Docker

http://antfie.com/2015/02/super-easy-dockerised-wordpress/

https://registry.hub.docker.com/_/wordpress/

 

Of course this will only of limited use until you let your Wordpress be visible to the web.

 

My use case is for Wordpress sandboxes, as we build our own websites.  I don't see unRaid being the right place for a commercial Wordpress website.  We are using vmWare Bitnami VM's or XAMPP internally for this purpose today, but don't want to trust opening them up to the web even for testing.

 

Using Squid's docker search plugin, I see there are many Wordpress containers out there.  Since WordPress runs most of the web today, I wondered, has anyone attempted to do an unRaid Wordpress Docker that is hardened for opening up to the web.

 

Here is some comments on the official Wordpress Docker

http://antfie.com/2015/02/super-easy-dockerised-wordpress/

https://registry.hub.docker.com/_/wordpress/

 

Of course this will only of limited use until you let your Wordpress be visible to the web.

 

My use case is for Wordpress sandboxes, as we build our own websites.  I don't see unRaid being the right place for a commercial Wordpress website.  We are using vmWare Bitnami VM's or XAMPP internally for this purpose today, but don't want to trust opening them up to the web even for testing.

 

You could use a combination of the MariaDB and ApachePHP dockers and install Wordpress yourself.  Otherwise if some spare time comes up I could take a crack at it (no promises)

  • Author

Thanks guys, I'm so spoiled with the awesome things you all have created. I should probably learn how to make a docker.

 

This one requires MySQL WordPress apache php all working together like a Swiss watch. I think I should try

 

"Hello world" first.

Thanks guys, I'm so spoiled with the awesome things you all have created. I should probably learn how to make a docker.

 

This one requires MySQL WordPress apache php all working together like a Swiss watch. I think I should try

 

"Hello world" first.

 

Shouldn't be that bad..

 

https://www.siteground.com/tutorials/wordpress/wordpress-installation.htm#download_wordpress

 

1. Download wordpress

2. upload to apache docker

3. access install page

4. make credentials on maria db docker

4b. put those credentials in install page

5. walk thru rest of setup :)

  • 10 months later...

Thanks guys, I'm so spoiled with the awesome things you all have created. I should probably learn how to make a docker.

 

This one requires MySQL WordPress apache php all working together like a Swiss watch. I think I should try

 

"Hello world" first.

 

Shouldn't be that bad..

 

https://www.siteground.com/tutorials/wordpress/wordpress-installation.htm#download_wordpress

 

1. Download wordpress

2. upload to apache docker

3. access install page

4. make credentials on maria db docker

4b. put those credentials in install page

5. walk thru rest of setup :)

 

This worked perfectly for me. I was actually a bit surprised that it was so easy.

  • 1 year later...

Hi all, 

I know this is an older topic, but I stepped into unRaid just the other day. After some experimenting I got a Docker container up using chvb Apache-PHP as the basic Docker. Following the directions in this topic I got Wordpress installed just fine, connecting to another MySQL docker, which I use for other stuff as well.  (never mind that).

 

However in Wordpress I do have some issues when trying to installing plugins in Wordpress.

1.  Wordpress asks for a FTP information --> got this fixed by adding -->  define('FS_METHOD', 'direct');   in the wp-config-php file.

2.  The issue now that remains (I cannot find a fix) is that I cannot upload new plugins bigger than 2 MB in Wordpress.

 

I do need some help with this 2nd problem. I already discovered that this limit is set in the php.ini file and it is called

php_value upload_max_filesize but I cannot change this parameter, as I do not know how to do a change in the Docker container Apache-PHP in a save way (without problems with updates to this container).  The other method I tried is changing the .htaccess  file in the www root where Wordpress is installed. 

When I change the .htaccess file I get an error, stating this is not allowed here.

 

The last and 3trd problem I face is that when I try to change the theme for instance, the Wordpress site is not showing the pictures of the themes I have installed already. For some reason Wordpress is not able to show the preview of the installed themes. After installing a new theme, pictures are not shown. Could this be related to the "fix" I implemented for issue 1 ? and how to fix this?

 

Please help,

Regards, Richard

 

 

 

  • Author
2 hours ago, Richard Aarnink said:

However in Wordpress I do have some issues when trying to installing plugins in Wordpress.

1.  Wordpress asks for a FTP information --> got this fixed by adding -->  define('FS_METHOD', 'direct');   in the wp-config-php file.

2.  The issue now that remains (I cannot find a fix) is that I cannot upload new plugins bigger than 2 MB in Wordpress.

 

I do need some help with this 2nd problem. I already discovered that this limit is set in the php.ini file and it is called

php_value upload_max_filesize but I cannot change this parameter, as I do not know how to do a change in the Docker container Apache-PHP in a save way (without problems with updates to this container).  The other method I tried is changing the .htaccess  file in the www root where Wordpress is installed. 

When I change the .htaccess file I get an error, stating this is not allowed here.

Hey Richard, those of us who use unRaid for real work situations are in the minority.  I haven't gotten much further with my unRaid -> WordPress project.  It would seem that spinning up an unRaid docker with a fresh WP install should be the ultimate lab environment.   Following your progress.....

In the past I've installed WP in both the Apache and LE containers.  Rather than running WP as a container itself.  Not done it for a long time though, but don't remember it being terribly difficult.

Hi CHBMB,

 

The installation of WP is not difficult at all, but after the basic install I would like to upload plugins using the normal WP wizards. This is not possible in the standard Apache-PHP or NGINX containers (tried LE also) because the upload is maximum 2MB (as set in the PHP.ini) checkt it with phpinfo()

I cannot find a way to change this, is there a way to safely change this parameter?

 

[EDIT]

I changed the php.ini file directly by entering the docker container and changed the php.ini file directly in /etc/php7

this works fine for now, but I think that when the container is updated, this change is gone. 

is there a way to prevent this from happening? 

Edited by Richard Aarnink

docker exec -it $container-name bash

 

will get you inside the container, from there you can edit the php.ini file.

 

Won't survive a container update though.

Okay, this is my try to make a change that will survive updates on the docker container.

 

1. Export the completer docker container contents

docker export [containername] > [containername].tar

 

2. unpack the .tar file and copy the /etc/php7  folder incl. contents to ==>    /mnt/user/appdata/[containername]/etc/php7

now we have the php.ini file on outside the docker container.

 

3. we only have to add an additional path in the docker config (in unRAID) 

the container path =  /etc/php7 will be replaced by the appdata directory provided in the config.

 

to my knowledge I can now safely change the php.ini file in the appdata/[containername]/etc/php7  map. 

when updates are provided to the docker, my changes will survive. I believe the only problem is when php7 changes are made that do need new files or changes in the /etc/php7 directory. This I do need to test ....

 

could someone provide a sanity check on this?

 

regards, Richard

 

I've been struggling with this, as well, in a different context.  I installed the linuxserver Let's Encrypt! docker and then within it installed PlexRedirect and PlexEmail.  Works great except that PlexEmail wants you to use cron to run it weekly to generate the new web page.  I then realized that that crontab setting wouldn't stick between updates, which reminded me of the other thorn in my side.  I use sickbeard_mp4_automator to convert all my downloads to m4v, but of course that gets lost every time I upgrade the nzbGet container.  I solved it mostly with an install script that I keep in the userdata so when I upgrade the nzbget container I can log in using docker exec and run the script.  I figured I'd do the same with Let's Encrypt and set up a script to recreate the cron entry.  BUT THEN I realized that I can just run the script directly with the docker command:

docker exec -ti letsencrypt python /config/www/PlexEmail/scripts/plexEmail.py

and

docker exec -ti nzbget sh /config/sickbeard-no-pause.sh

Then I realized that the User Scripts plugin was running scripts in the UNRaid shell, and I bet I can do that there.

 

I set up the User Scripts plugin to run that script every five minutes and the PlexEmail script every week.  

 

You can probably do something like that with your php.ini.  I keep a modified autoProcess.ini in the appdata folder that my script copies into place; you could do the same thing with php.ini.

 

Your script would copy your php.ini into place and reset whatever needs resetting [maybe apache/nginx needs to be restarted or what have you]; you could use a flag file that goes away when the container gets reset to control whether you need to do anything [if you even care about that; my script can run over and over without bollixing anything up], and then run the script every five minutes.  When your Wordpress container gets reset, in no more than 5 minutes your custom setup will be restored.

In the same vein you could also set via the auto update plugin to auto update those particular apps, and have it set to run a script whenever the app updates   

  • 2 weeks later...

Thanks!  Had no idea that facility existed, and it looks like it's a more sensible solution to my nzbget problem, for sure.

54 minutes ago, chazlarson said:

Thanks!  Had no idea that facility existed, and it looks like it's a more sensible solution to my nzbget problem, for sure.

If you're refering to to auto update here's the docs and the feature as it's not part of the gui for the plugin

 

Edited by Squid

  • 3 months later...

Hello all!

 

Just started using Unraid a few weeks ago, love it , went from 2012 R2. Never going back.

 

The problem : I tried following smdion's post to get Wordpress working

 

Quote

Shouldn't be that bad..

 

https://www.siteground.com/tutorials/wordpress/wordpress-installation.htm#download_wordpress

 

1. Download wordpress

2. upload to apache docker

3. access install page

4. make credentials on maria db docker

4b. put those credentials in install page

5. walk thru rest of setup :)

 

I am getting stuck on an error, ( Error establishing a database connection ) right after starting the install

 

MySQL settings are below

 

MYSQL_ROOT_PASSWORD password

MYSQL_DATABASE wordpress

MYSQL_USER wordpress

MYSQL_PASSWORD password

 

My wordpress is set as follows

 

Database Name : wordpress

Username : wordpress

Database Host : localhost

table Prefix wp_

 

 

I have tried a few different things to fix it. I edited the wp_conf file and put the local host as 127.0.0.1:3306 and changed the database name, username. password and database host to the above, still no help.

 

I am not sure were else to look.

 

Thank you for your time :)

Use your unraid hostip instead of 127.0.0.1.

Sorry, i should have included i tried that as well ( 192.168.1.100:3306 ) no luck

 

Edit 10:34 AM Oct 3: Sorry all.

 

It looks like i shouldn't be playing late at night.

 

I installed MySQL not mariadb.

 

Fixed that, now mariadb is installed along with Apache-PHP

 

With mariadb, im not sure how to create a database. ( I am new to this, ( like you can't tell ) )

 

in mariadb i see:

 

Host Port 1: 3306

Key 1: 99 ( Container Variable: PUID )

Key 2: 100 ( Container Variable: PGID )

Key 3: MYPASSWORD ( Container Variable: MYSQL_ROOT_PASSWORD )

 

Now, i have added two Variable's thinking that is how you make a database, but it still does not work.

 

attached is a screenshot of how my mariadb looks.

 

I also tried using mariadb as the Database name and 99/100 as the username... but that wasn't it

sql.png

Edited by PLAY3R
Wrong info

*bump* still no luck with getting it to work by playing around with settings

31 minutes ago, PLAY3R said:

*bump* still no luck with getting it to work by playing around with settings

 

You've added variables to the docker container that aren't supported.  If you want to create a new user and database for wordpress then you're going to have to drop down to command line in the container or connect using root and something like HeidiSQL.  

 

My nextcloud tutorial on the linuxserver.io website will show you how I connect the MariaDB container to Nextcloud (using root) and should point you in the right direction.

Archived

This topic is now archived and is closed to further replies.

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.