RADRaze2KX
Verified User
- Joined
- Jan 4, 2024
- Messages
- 35
Servers:
1.) WordPress (our sales funnel site)
2.) WHMCS (the "store")
3.) DirectAdmin (cloudlinux w/ CageFS, MySQL Governor, PHP Selector, Softaculous)
I feel this is a stupid question, but the documentation isn't clear, and searching for answers on Google brings up posts from literally 20 years ago.
In a situation where a client is buying WordPress hosting from our WHMCS server and it's provisioned in DirectAdmin, how do they access their site without userdir (hostingdomain.com/~userdir) enabled if their domain hasn't propagated yet?
I'm asking this seemingly obvious question because it's led to down a rabbit hole that seems overly complicated to fix.
When Softaculous installs WordPress using all defaults to the freshly created user account, the wp-config.php file is set to DB_HOST = 'localhost', which is causing the site to get "Error establishing Database Connection". Changing 'localhost' to '127.0.0.1' fixes the issue, but I can't fix this manually for every site as their being created.
So I created a universal.custom.php file for Softaculous, to specify that it WordPress should be installed with 127.0.0.1. This made the sites install with 127.0.0.1 as the DB_Host but the sites are messed up when they're installed directly to the public_html of the user.
HOWEVER, if I install to a subdirectory of public_html, like "public_html/wp", the site installs and works just fine.
I then asked Softaculous support what the issue was, and they logged into the server and said it was fixed, and it's not (I deleted the testsite and recreated it from WHMCS -> [CREATE], and it's the same exact issue.
A lot of threads I've seen are about WordPress not liking the ~userdir directly and it causing issues. So I thought "well, I'd like to set it up so that the site is accessed at site.hostingdomain.com rather than hostingdomain.com/~site, but there's no documentation on how to do that for CloudLinux.
So I'm overly frustrated. I've been working on getting everything from our client-facing funnel site to WHMCS and CloudLinux and DirectAdmin polished and perfect. This last issue I've been trying to solve has doubled the amount of time I've spent doing this project.
Can anyone please provide me some guidance on how I can either:
1.) get DirectAdmin to set up new sites from WHMCS sign-ups to site.hostingdomain.com (like siteground does)
2.) assist me with figuring out why 'localhost' is causing database connection errors
or
3.) figure out how to automatically change the localhost to 127.0.0.1?
It seems like any one of these three being solved would solve my remaining issues but all of my posts to various forums have gone unanswered.
1.) WordPress (our sales funnel site)
2.) WHMCS (the "store")
3.) DirectAdmin (cloudlinux w/ CageFS, MySQL Governor, PHP Selector, Softaculous)
I feel this is a stupid question, but the documentation isn't clear, and searching for answers on Google brings up posts from literally 20 years ago.
In a situation where a client is buying WordPress hosting from our WHMCS server and it's provisioned in DirectAdmin, how do they access their site without userdir (hostingdomain.com/~userdir) enabled if their domain hasn't propagated yet?
I'm asking this seemingly obvious question because it's led to down a rabbit hole that seems overly complicated to fix.
When Softaculous installs WordPress using all defaults to the freshly created user account, the wp-config.php file is set to DB_HOST = 'localhost', which is causing the site to get "Error establishing Database Connection". Changing 'localhost' to '127.0.0.1' fixes the issue, but I can't fix this manually for every site as their being created.
So I created a universal.custom.php file for Softaculous, to specify that it WordPress should be installed with 127.0.0.1. This made the sites install with 127.0.0.1 as the DB_Host but the sites are messed up when they're installed directly to the public_html of the user.
HOWEVER, if I install to a subdirectory of public_html, like "public_html/wp", the site installs and works just fine.
I then asked Softaculous support what the issue was, and they logged into the server and said it was fixed, and it's not (I deleted the testsite and recreated it from WHMCS -> [CREATE], and it's the same exact issue.
A lot of threads I've seen are about WordPress not liking the ~userdir directly and it causing issues. So I thought "well, I'd like to set it up so that the site is accessed at site.hostingdomain.com rather than hostingdomain.com/~site, but there's no documentation on how to do that for CloudLinux.
So I'm overly frustrated. I've been working on getting everything from our client-facing funnel site to WHMCS and CloudLinux and DirectAdmin polished and perfect. This last issue I've been trying to solve has doubled the amount of time I've spent doing this project.
Can anyone please provide me some guidance on how I can either:
1.) get DirectAdmin to set up new sites from WHMCS sign-ups to site.hostingdomain.com (like siteground does)
2.) assist me with figuring out why 'localhost' is causing database connection errors
or
3.) figure out how to automatically change the localhost to 127.0.0.1?
It seems like any one of these three being solved would solve my remaining issues but all of my posts to various forums have gone unanswered.