Local Community

Errors after installing Local: opcache, Unable to find DB_Host, DB_Name, DB_User, DB_Password, wp-config, Error establishing a database connection

I’m encountering several issues after installing Local: first with opcache and then with the database.

When I got the opache error as in this topic, I followed the instructions by @vidalnico and edited the php.ini.hbs file. That seemed to solve that problem and the site was created on Local.

But then the database info showed the error messages as described in this topic: Unable to find DB_Host, DB_Name, DB_User, DB_Password. So I followed the instructions by @juha and edited the wp-config.php file with those parameters.

The issue seemed to be solved on Local, but when I opened the Admin page I got the error on the image: Error establishing a database connection

I even deleted that site and started all over again with a new one. I encountered the exact same problems.

Can anybody help with this, please?

I’m on Win7 with Local v. 5.9.6.

Thanks!

Hey @roc

The Local team doesn’t do any testing on Windows 7 since that’s reached it’s end of life.

Reading through that first topic, things might work if you are able to create a new site using PHP 5.6, but given that these binaries aren’t compiled with Windows 7 in mind, it’s possible that Local won’t work completely on this version of Windows.

If you can, I’d recommend upgrading to Windows 10, which has much better support for Local and the various pieces of software that Local manages (php, mysql, nginx/apache)

Hi @ben.turner,
Thanks for replying so fast and for the info.
Unfortunately, I can’t upgrade to Win10 on that computer :pensive: and I guess using an old version of PHP can be problematic with themes and when I take the site live.
As a last resort, do you think/recommend that I could use an older version of Local that was compatible back in the day with Win7? (and, if so, do you know which version would that be?). I think I read in another topic that someone tried that…
Many thanks again for the reply!

Older versions of Local will still use the newest version of the PHP lightning service – there isn’t a way to download specific versions of PHP.

You might try Local Classic (the 3.x) version. The last update was from 2019:

It’s built on Docker and has completely different versions of PHP so it might work, but it’s also no longer getting updates so it will be missing features as well as possibly be broken due to changes in Windows.

Still, it might be worth a shot if you absolutely can’t update to Windows 10. Good luck!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.