Default database host. Friends, when installing Wordpress, it suggests using localhost as the database address, however, my ISPConfig only accepts changing it to 127.0.0.1. I would like to make it possible with both 127.0.0.1 and localhost. If it's not possible both ways, I prefer localhost. Can you help me how can I achieve this in ISPConfig?
Instead of just using either localhost or 127.0.0.1, you can also use this as well as it will automatically detect the right one to be used: Code: define( 'DB_HOST', $_ENV{DATABASE_SERVER});
I'm using FPM and chroot enabled. After all, which chroot is enabled? I turned it on but I don't know what it's for.
PHP-FPM Chroot is a chroot environment for PHP-FPM. And from within that chroot, you can't access the MySQL socket as MySQL is outside of the chroot. So when you enable chrooting in PHP, you must use 127.0.0.1 as MySQL hostname to connect to MySQL over the network. When you disable chrooting, then you can either use localhost or 127.0.0.1 as MySQL hostname.