[Support] kru-x - wordpress


Recommended Posts

11 hours ago, Tom Kamin said:

You mean browser cache ? Ive tried. I can send you the site via PM if you want to check it out.

 

Hi Tom,

 

Yes I ment the browser cache and if that isn't working I still think it is due to how it's installed. Can't see your site but you have to install the site from your domain, several people have had that problem as WP saves all the links and redirects in your DB. Eg. if you installed WP on your local host ( ex . 192.168.1.100) the CSS file is going to point to that address when it should point to yourdomain.com.

 

So to fix that delete both folders, WP & DB then reinstall the containers and before you do the installation from the WP installation screen, connect your domain. Than when you can connect to the WP installation page from your domain, and not untill then start the installation. Then you can point the DB to it's local IP address.


WP will recognice that you are on your domain and add all the correct redirects. If you have an existing site that you would like to use, use the "Duplicator Pro" Plugin or similar to migrate the whole site to the new domain. Works really well and I do it all the time with my sites.

 

Hope it helps,

Kru-x 

Link to comment
  • 2 weeks later...
On 9/1/2021 at 12:39 AM, Kru-x said:

Hi Tom,

 

Yes I ment the browser cache and if that isn't working I still think it is due to how it's installed. Can't see your site but you have to install the site from your domain, several people have had that problem as WP saves all the links and redirects in your DB. Eg. if you installed WP on your local host ( ex . 192.168.1.100) the CSS file is going to point to that address when it should point to yourdomain.com.

 

So to fix that delete both folders, WP & DB then reinstall the containers and before you do the installation from the WP installation screen, connect your domain. Than when you can connect to the WP installation page from your domain, and not untill then start the installation. Then you can point the DB to it's local IP address.


WP will recognice that you are on your domain and add all the correct redirects. If you have an existing site that you would like to use, use the "Duplicator Pro" Plugin or similar to migrate the whole site to the new domain. Works really well and I do it all the time with my sites.

 

Hope it helps,

Kru-x 

THANK YOU ! This actually solved all the issues nobody could figure out. Thanks !!! 

Link to comment
  • 3 weeks later...
6 minutes ago, darrenyorston said:

Hello. I have Wordpress set up and running on my server with it being published to the web using nginxproxymanager. Its great and works perfectly.

 

I am now trying to work out how to host a second site. I have created  a second database in mariadb but how do i install a second wordpress container?

Hi darrenyorston,

 

This is talked about before in this thread, have a quick skim throught them and most of the answers are there.

But in short: its actually really easy, but dont use the same DB for two different sites, you can get in to a lot of headace.

Just do as you did with the first one, spin up a new MariaDB with a diffrent folder and Port number, and the same with your second Wordpress site, then you just route to that site in NPM by the port number.


Let me know if you run in to problems,

Kru-x 

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

Hi darrenyorston,

 

This is talked about before in this thread, have a quick skim throught them and most of the answers are there.

But in short: its actually really easy, but dont use the same DB for two different sites, you can get in to a lot of headace.

Just do as you did with the first one, spin up a new MariaDB with a diffrent folder and Port number, and the same with your second Wordpress site, then you just route to that site in NPM by the port number.


Let me know if you run in to problems,

Kru-x 

Thanks mate. Ive read over the previous posts in the thread and I wouldn't say its clear. You say not to use the same DB for both sites, which is understandable, and to create a new MariaDB. Do you mean a new database within MariaDB or an entirely new MariaDB container? ie I will have two MariaDB containers running, one with the databases for all my others containers (authelia/nextcloud/photprism/wordpress) and another that solely contains a database for the second wordpress site?

Link to comment
2 minutes ago, darrenyorston said:

Thanks mate. Ive read over the previous posts in the thread and I wouldn't say its clear. You say not to use the same DB for both sites, which is understandable, and to create a new MariaDB. Do you mean a new database within MariaDB or an entirely new MariaDB container? ie I will have two MariaDB containers running, one with the databases for all my others containers (authelia/nextcloud/photprism/wordpress) and another that solely contains a database for the second wordpress site?

Hi,

 

Yes you just start a new db container. But it is a preference and personally I have one db container for each application. The problem is if that db fails you loose all your data for each application whilst if you have one for each only that one fails. There is not much overhead to run one for each and I all the time trying out other applications, crank up two containers and when I am done I just toss both of them.

 

kru-x

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

Hi,

 

Yes you just start a new db container. But it is a preference and personally I have one db container for each application. The problem is if that db fails you loose all your data for each application whilst if you have one for each only that one fails. There is not much overhead to run one for each and I all the time trying out other applications, crank up two containers and when I am done I just toss both of them.

 

kru-x

ok, thanks.  Why not just do backups of your database? Seems like your adding complexity for little reason.

Link to comment
24 minutes ago, darrenyorston said:

ok, thanks.  Why not just do backups of your database? Seems like your adding complexity for little reason.

I do backups of all my containers and it might seem like it is complexed but it isn't. I name them the same as the application container eg - I pair them like, wordpress and wordpress-db than they show up next to eachother. Easier to just add a new db container than add/delete db's in one container and I believe it makes it more readable and they might even work better on their own. There was one guy earlier in the thread that got a corupt db and he didn't know when it started, thus he had to remake his whole setup. But it is as I mentioned a personal preference, it will works either way. There is no reason why you couldn't add a separate db in your already existing container, it's just to point the second wordpress application to that db name.

 

Kru-x

Link to comment
10 hours ago, darrenyorston said:

Hello. I have Wordpress set up and running on my server with it being published to the web using nginxproxymanager. Its great and works perfectly.

 

I am now trying to work out how to host a second site. I have created  a second database in mariadb but how do i install a second wordpress container?

And I guess after reading your post through properly 😏 I didn't actually answered your question. Hups. But you just name the second wordpress installation differently and use a different folder for the installation as well as a different port offcourse. Then install it as you did with the first one pointing it to the db of your choice. Then you should be up and running.

Kru-x 

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

And I guess after reading your post through properly 😏 I didn't actually answered your question. Hups. But you just name the second wordpress installation differently and use a different folder for the installation as well as a different port offcourse. Then install it as you did with the first one pointing it to the db of your choice. Then you should be up and running.

Kru-x 

Thanks mate. I hear what you are saying. But how do you actually install a duplicate container of the same type as one already installed? Whenever I try it opens the config for my existing container. I presume you do it by some means other than using the community applications tab? Or do you open the application values for the container in community applications, append something to distinguish a new container which, as a result, creates a duplicate container?

Link to comment
3 minutes ago, darrenyorston said:

Thanks mate. I hear what you are saying. But how do you actually install a duplicate container of the same type as one already installed? Whenever I try it opens the config for my existing container. I presume you do it by some means other than using the community applications tab? Or do you open the application values for the container in community applications, append something to distinguish a new container which, as a result, creates a duplicate container?

You just open the template file in your list for ex. wordpress (if that what you have named it)  and rename the next template to wordpress2, then you have to choose a different folder. I name the folder exactly the same as the container eg "wordpress2" and the port number. The newly named template will be saved in your list of templates you have, the old still remains. You could also choose the app from the comunity app page, same same and this can be done with all containers in the same way. It is just how unraid templates and docker works.

 

Kru-x

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

You just open the template file in your list for ex. wordpress (if that what you have named it)  and rename the next template to wordpress2, then you have to choose a different folder. I name the folder exactly the same as the container eg "wordpress2" and the port number. The newly named template will be saved in your list of templates you have, the old still remains. You could also choose the app from the comunity app page, same same and this can be done with all containers in the same way. It is just how unraid templates and docker works.

 

Kru-x

ahh ok. ill give that a go. thanks.

Link to comment
  • 3 weeks later...

Hi all, I am trying to remove Wordpress and start all over again since I messed up my first installation. I removed the DB, the app, deleted the appdata folder for Wordpress, and the template container.

 

When I got and recreate the DB, DB user, and install Wordpress... it still somehow pulls up the data from previous installation. Where is it pulling this information if I already deleted it? I cannot get to the new set up process.

 

Also, changing the port during installation doesn't seem to work. It still goes to the default port 8080 even though I changed it to port 8082. How do you force the new port I gave it during installation? Thank you.

Edited by luigi408
added port question.
Link to comment
1 hour ago, luigi408 said:

Hi all, I am trying to remove Wordpress and start all over again since I messed up my first installation. I removed the DB, the app, deleted the appdata folder for Wordpress, and the template container.

 

When I got and recreate the DB, DB user, and install Wordpress... it still somehow pulls up the data from previous installation. Where is it pulling this information if I already deleted it? I cannot get to the new set up process.

 

Also, changing the port during installation doesn't seem to work. It still goes to the default port 8080 even though I changed it to port 8082. How do you force the new port I gave it during installation? Thank you.

Disregard this. After enabling the site in my NPM with the 8082 port I was able to hit my WordPress site domain.com/wp-admin. When I go to the application icon within my Unraid server and click on WebUI that still takes me to port 8080 for some reason. Anyways, it seems to be working. Thank you!

Link to comment
  • 1 month later...

Hello all.

My Wordpress Docker works fine. but now i have a problem with the upload limit. i want to hit it up to about 40MB, now it is allmost 2MB.

 

adjust the wp-config.php dosnt work.

 

i dont found the php.ini in the wordpress folder.

also the .htaccess

 

and the support info from wordpress docker : https://hub.docker.com/_/wordpress/
 

See the "Configuration" section of the php image documentation.

For example, to adjust common php.ini flags like upload_max_filesize, you could create a custom.ini with the desired parameters and place it in the $PHP_INI_DIR/conf.d/ directory:

FROM wordpress:tag COPY custom.ini $PHP_INI_DIR/conf.d/
 

i dont know in wich folder i can create a custom.ini
 

Link to comment
On 11/26/2021 at 10:20 PM, KilianDee said:

Hello all.

My Wordpress Docker works fine. but now i have a problem with the upload limit. i want to hit it up to about 40MB, now it is allmost 2MB.

 

adjust the wp-config.php dosnt work.

 

i dont found the php.ini in the wordpress folder.

also the .htaccess

 

and the support info from wordpress docker : https://hub.docker.com/_/wordpress/
 

See the "Configuration" section of the php image documentation.

For example, to adjust common php.ini flags like upload_max_filesize, you could create a custom.ini with the desired parameters and place it in the $PHP_INI_DIR/conf.d/ directory:

FROM wordpress:tag COPY custom.ini $PHP_INI_DIR/conf.d/
 

i dont know in wich folder i can create a custom.ini
 

Halloj KilianDee,

 

I use the .htaccess method and it works great. Just toss a .htaccess file in to your root folder. Eg where your docker container mounts, most likely in your appdata/yourcontainer, and in the file add:

 

#If more upload capacity is needed, my addition
php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

 

kru-x

  • Like 1
Link to comment
  • 1 month later...
  • 1 month later...

Strange problem after wordpress import.

 

I have just finished importing 13 existing wordpress installations into Unraid, each in a separate docker and separate databases. everything works almost perfect.  excelpt TOTP.

All sites is secured with TOTP for login, and I can't login with my generated code. I renamed the plugin folder so that I could log in and after I logged in I changed the folder back and reset the TOTP code... Then I created a new code and set TOTP as enables and primary.

 

The problem is that the new code is is not saved and setting TOTP as enabled and primary is not saved either so when I log out and try to log in again I only need username/password.

 

Any ideas out here? Is there something special to consider when using "old" wordpress installations like this?

 

All wordpresses was at latest versions, the import process was like this:

1. Create database and wordpress docker in Unraid

2. dump DB at old server and import it to new DB in Unraid MariaDB

3. copy wp-content folder from old installation to docker installation

 

Like this:

Create wordpress docker in unraid
Create database and user
mysqldump -h oldserver -u root -p <db> > <db>.sql
mysql -h unraidserver -u root -p <db> < <db>.sql

scp -pr /var/www/<site>/wp-content/* unraidserver:/mnt/user/appdata/wordpress/<site>/wp-content/.

Edited by shalafi
Link to comment
37 minutes ago, shalafi said:

Strange problem after wordpress import.

 

I have just finished importing 13 existing wordpress installations into Unraid, each in a separate docker and separate databases. everything works almost perfect.  excelpt TOTP.

All sites is secured with TOTP for login, and I can't login with my generated code. I renamed the plugin folder so that I could log in and after I logged in I changed the folder back and reset the TOTP code... Then I created a new code and set TOTP as enables and primary.

 

The problem is that the new code is is not saved and setting TOTP as enabled and primary is not saved either so when I log out and try to log in again I only need username/password.

 

Any ideas out here? Is there something special to consider when using "old" wordpress installations like this?

 

All wordpresses was at latest versions, the import process was like this:

1. Create database and wordpress docker in Unraid

2. dump DB at old server and import it to new DB in Unraid MariaDB

3. copy wp-content folder from old installation to docker installation

 

Like this:

Create wordpress docker in unraid
Create database and user
mysqldump -h oldserver -u root -p <db> > <db>.sql
mysql -h unraidserver -u root -p <db> < <db>.sql

scp -pr /var/www/<site>/wp-content/* unraidserver:/mnt/user/appdata/wordpress/<site>/wp-content/.

Have u tried to use a migration tool, such as wp-migration? Seems to be a permission problem. 

Kru-x

Link to comment

I tried setting this in wp-config.php and wp-config-docker.php:
define( 'WP_DEBUG', !!getenv_docker('WORDPRESS_DEBUG', 'true') );
define( 'WP_DEBUG_LOG', '/var/www/html/wp-errors.log' );

 

But no debug log is created in the dockers /var/www/html folder

 

Did some more testing, I can change and save other information in the user profile but the TOTP will not save..

Plugin folder (and files) has correct user/group
image.png.bdd8d2223fb34195173982a1e887bb97.png

 

 

Link to comment
14 minutes ago, shalafi said:

I tried setting this in wp-config.php and wp-config-docker.php:
define( 'WP_DEBUG', !!getenv_docker('WORDPRESS_DEBUG', 'true') );
define( 'WP_DEBUG_LOG', '/var/www/html/wp-errors.log' );

 

But no debug log is created in the dockers /var/www/html folder

 

Did some more testing, I can change and save other information in the user profile but the TOTP will not save..

Plugin folder (and files) has correct user/group
image.png.bdd8d2223fb34195173982a1e887bb97.png

 

 

The log would be in the container itself, sorry not sure but still think it is a permission error. Try the migration tool, usually solves any problems, especially DB troubles. 

Kru-x 

Link to comment

It was in the container I looked for the missing log.

Anyway, tried the export/import and that didn't change anything. Since the only thing that didn't work after the migration was this plugin I removed it from my 13 sites for the time being 🙂

 

Trying to understand the permission issue.... The database has full permissions, the files/folders has either www-data or root... I'll do some more thinking....

 

Edited by shalafi
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.