Support » Installing WordPress » Installing WP in a VirtualHost that is already setup

  • Resolved cjhockey35


    I have VirtualHosts setup and working. I want to install wordpress in them. I have done everything following this guide . I get stuck when WP tries to config my wp-config.php (trying to avoid manual setup). It says it is having an error making a database connection at localhost. Now it seems to me that the database host shouldnt be localhost since WP is installed in my VirtualHost directory. Am I right in assuming this is the problem? How do I correct it?

Viewing 6 replies - 1 through 6 (of 6 total)
  • OK i set up the wp-config myself, but still an error connecting to the database. I think its the DB hostname still. Localhost doesnt make sense for it being in the virtualhost root, to me at least

    when you setup database then you need to find out what is your DB host , DB user, DB name, DB password. So, did you created your DB name, DB user and password? For DB host if you go to your phpmyadmin then you should see the host name at top.

    It says ‘localhost’. So if the problem isn’t the hostname what could it be? I shelled into my server and accessed mysql and SET the password for my user I created during the install (I heard this may fix the problem). I also made sure it was running. When I try to login into the mysql user I get: ERROR 1045 (28000): Access denied for user ‘labellevie’@’localhost’ (using password: YES)

    I’ve had this problem with updates because of directory ownership and permissions.

    It could be the permissions on your directories. The program may not have permission to run. If you can open up your permissions with chmod, run the installation, then lock down your permissions again, that might do the trick.

    You can also chown ownership of the directories and files to the www-data and see if that helps.

    I opened up permissions, 777, and chown to www-data:www-data for /var/www and all below, which is where all my sites are and still nothing. Yes , I tightend those backup afterwards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Installing WP in a VirtualHost that is already setup’ is closed to new replies.