• Hello,
    I am trying to install wordpress on my new laptop. A few years ago I have already installed wordpress successfully on my old computer, so now I can’t understand why it is not working. I have installed MySQL Server and created a new database. When I run localhost:8080/wordpress I get the page that asks me for the database informations like user, password etc. I inserted them and when I click “send” I get the error:

    There has been a critical error on your website.
    Learn more about debugging in WordPress.

    What can I do to fix that? I have no idea what to do because no informations are given about the error.

    Thank you very much in advance!

    • This topic was modified 4 years, 8 months ago by Jan Dembowski.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Typically you would get an email disclosing the error, but emails frequently do not work on localhost installations. The following would be poor practice on a publicly accessible site, but is OK on a limited access localhost.

    Locate in wp-config.php where WP_DEBUG is defined and change false to true. Right below this insert this line:
    define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );

    With these definitions, any errors will be displayed in your browser. If for some reason you don’t want errors to be displayed, you can always see them in the Apache error logs. The error message should be a clue about what to fix, usually by removing the guilty theme or plugin. However, with a new installation that shouldn’t be the problem. Anyway, we’ll need to know what and where the error is in order to know how to proceed.

    While you’re editing wp-config.php, you can manually set your DB credentials at the appropriate locations if they have not already been set. You still need to run /wp-admin/install.php to setup the DB tables, but you will no longer be asked for credentials if they’re already set.

    Thread Starter benji8

    (@benji8)

    I did the changes you suggested, and inserted the DB credentials manually in the wp-config.pho file and now I get the following error:

    Fatal error: Uncaught Error: Call to undefined function mysql_connect()

    I read that this can be due to the fact that I’m using PHP7, so now mysql_connect() is deprecated. I wanted to try to downgrade to PHP5 but I couldn’t find it anywhere to download. How could I fix this?

    Thanks a lot!

    From what you wrote, I understand you have separate installations of MYSQL and PHP, if that is true can you try using a Web Server software like XAMPP or Local by Flywheel?

    I believe that would solve your problem.

    Cheers!

    Thread Starter benji8

    (@benji8)

    Yes, I have separate installations for MySQL and PHP. I tried with XAMPP but I got the following error when starting Apache:

    Port 80 in use by “Unable to open process” with PID 4!

    I have tried to change the port to 8080 in the httpd.conf file but I stil get the Port 80 error.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Critical Error on your site’ is closed to new replies.