Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you sure that your database user is valid to login remotely, very often it is limited to the domain of localhost.

    For the life of me I can barely see why you want to do this ? You will be able to do some changes to your local website by changing files, but many changes involve updating the database, which you are sharing with your live site, which makes little sense.
    I always download a copy of the live database, adjust it as necessary to run locally. Which brings to mind how do you cope with the different “Site Address” and “WordPress Address” between local and live.

    Thread Starter EduardoV5

    (@eduardov5)

    I am sure my database user can login remotely because I added my IP address to the valid remote hosts on MySQL. If this wasn’t the case, I couldn’t set my local WP to use my remote database, which it can. I can hit the site and the login screen, I just can’t go past the login screen.

    The reason I want to do this is so that myself and a designer can be working off the same development database with changes to several plugins. We’ll have different version-controlled codebases but share the same development database.

    The way you cope with site address and wp address locally is by overriding the database values via your local wp-config.php through these statements:

    define(‘WP_HOME’,’http://localhost/mysite.com’);
    define(‘WP_SITEURL’,’http://localhost/mysite.com’);

    Just maybe enabling debugging will gather you some more information, in your wp-config.php file, find the WP_DEBUG line, comment it out and add:

    error_reporting(E_ALL); ini_set('display_errors', 1);
        define( 'WP_DEBUG', true);

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Local WordPress and remote database: can't login’ is closed to new replies.