Installation failed. Error message: ["sh: 1: Syntax error: EOF in backquote substitution"," [404]"]

I’ve been grappling with this error all day, trying out all the solutions posted here to no avail. My server runs on Ubuntu 22.04.

In the end, I resorted to copying the entire PHP 8.2 configuration from one of my other Cyberpanel Ubuntu 22.4 servers where everything was functioning smoothly, and pasted it into the PHP 8.2 configurations of the new server. Surprisingly, it worked, and WordPress can now be installed without any issues.

I’m baffled as to why this error occurred or why it was resolved simply by altering the PHP settings. However, I vaguely recall that the other server had some custom edits in its PHP.