WordPress.org

Ready to get started?Download WordPress

Forums

Problems installing WP on a local server (9 posts)

  1. Forrester
    Member
    Posted 1 year ago #

    Hello All,

    I am trying to install WP on my personal dedicated server.

    I followed this guide: https://www.digitalocean.com/community/articles/how-to-install-wordpress-on-ubuntu-12-04

    however after completing the process and visiting localhost/wp-admin/install I get the following error.

    http://imgur.com/ffjMHD2

    here is my wp-config.php file (I removed my password for security purposes but trust me it was right)

    <?php
    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information
    * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don't have to use the web site, you can just copy this file
    * to "wp-config.php" and fill in the values.
    *
    * @package WordPress
    */

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');

    /** MySQL database username */
    define('DB_USER', 'wpuser');

    /** MySQL database password */
    define('DB_PASSWORD', 'removed');

    /** MySQL hostname */
    define('DB_HOST', 'WEBSERVER');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');

    /**#@+
    * Authentication Unique Keys and Salts.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define('AUTH_KEY', 'put your unique phrase here');
    define('SECURE_AUTH_KEY', 'put your unique phrase here');
    define('LOGGED_IN_KEY', 'put your unique phrase here');
    define('NONCE_KEY', 'put your unique phrase here');
    define('AUTH_SALT', 'put your unique phrase here');
    define('SECURE_AUTH_SALT', 'put your unique phrase here');
    define('LOGGED_IN_SALT', 'put your unique phrase here');
    define('NONCE_SALT', 'put your unique phrase here');

    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = 'wp_';

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
    * language support.
    */
    define('WPLANG', '');

    /**
    * For developers: WordPress debugging mode.
    *
    * Change this to true to enable the display of notices during development.
    * It is strongly recommended that plugin and theme developers use WP_DEBUG
    * in their development environments.
    */

  2. yakbrother
    Member
    Posted 1 year ago #

    For most setups, you should use "localhost" as the MySQL hostname. Can you log into mysql with that username and password on your local server, without wordpress?

  3. Forrester
    Member
    Posted 1 year ago #

    I changed the hostname to localhost, same result. I don't use that username to log into mysql without wordpress, I use root & password.

    I have also tried setting hostname to my IP, root, localhost, webserver, WEBSERVER

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');

    /** MySQL database username */
    define('DB_USER', 'wpuser');

    /** MySQL database password */
    define('DB_PASSWORD', 'removed');

    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');

  4. yakbrother
    Member
    Posted 1 year ago #

    I mean - just try logging in with it, to make sure it was set up correctly. One thing that's got me before was the fact that some servers will add a prefix to the table/username.

    Sometimes on my local machine, MySQL will fail to start (or crash) and I need to restart it.

    Just some things to try. If none of that works, then it probably doesn't have to do with WordPress, but with the way the server accesses your MySQL. Do you have SequelPro set up? Or PHPMyAdmin? Whatever settings work with them should work with WordPress.

  5. Forrester
    Member
    Posted 1 year ago #

    Thanks for the help yakbrother but honestly I'm still pretty new with Ubuntu and running my own server. I log into MySQL using the command: mysql -u root -p

    Then I enter my pw and I'm in. I dont know how to log into mysql using 'localhost'

    I am currently using webmin to manage my server operations (in conjunction with the command line). I took my a few tries to figure out how to log into mysql from webmin because I didn't know what the username was. During the set up for mysql it only asked me to set a password. SO I tried my server username, then I tried root and my password and that worked.

    As far as I can tell mysql is running fine. I tried stopping it and restarting it a few times just to be sure.

    I hope this makes sense, as I said I'm still new. Thanks for taking the time to help me so far : )

  6. yakbrother
    Member
    Posted 1 year ago #

    Hi -

    If you type in "mysql -u wpuser -p" and then the wordpress password, you should be able to log in as that user. Then I would try to get into the wordpress database and run a query or two. If it doesn't work, then there might have been a problem setting up the user or his permissions. Hope that helps...

  7. Forrester
    Member
    Posted 1 year ago #

    Okay i tried mysql -u wpuser -p

    I got the error "error 1045 (28000): Access denied for user 'wpuser'@'localhost' (usingpassword: YES)"

    I changed the password of the user to ensure I was using the correct password. Should I delete the user and recreate? I created the user by following the directions in the tutorial mentioned in my first post.

  8. yakbrother
    Member
    Posted 1 year ago #

    Yeah, it sounds like there was an error while creating the user. Try it again, or to make it easier, you might put PHPMyAdmin on your machine:

    http://www.phpmyadmin.net/home_page/downloads.php

    You can just log in as your root user, then create users and databases visually afterwards. It makes it nice and easy to set up a wordpress install.

  9. WP Sites - Brad Dalton
    Member
    Posted 1 year ago #

    So much easier using instantwp.com to install WordPress locally on Windows or Mamp for Mac

Topic Closed

This topic has been closed to new replies.

About this Topic