• Resolved Bloke

    (@bloke)


    I am trying to log into a local install of my site. I usually import the SQL file, login and go to phpmyadmin and update the url. But the site is cached and is redirecting me to the https version of the live site. I disabled all plugins in the database. I also reactivated them and used the function to clear the cache.

    if (function_exists('sg_cachepress_purge_cache')) {
        sg_cachepress_purge_cache();
    }
    • This topic was modified 4 years, 2 months ago by Bloke.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Plamen M

    (@plamenm)

    Hello, @bloke,

    In general, you should not need any caching in a local installation of your site. So, you should better keep caching plugins disabled, as well as any caching features that your theme might be having.

    Wordpress has several ways of forcing https on the site. Check if you have any local .htaccess rules. Also, check the wp-config.php file for entries related to the SSL redirects like:

    define(‘FORCE_SSL_ADMIN’, true);
    define(‘FORCE_SSL_LOGIN’, true);

    or manually defined site URLs with https in the wp-config.php file. This forum thread discusses different ways of forcing SSL support in a WordPress site, you may want to check it for other clues:

    https://stackoverflow.com/questions/31888405/correctly-force-ssl-on-wordpress-via-wp-config-php

    Delete the content in wp-content/cache/.

    Regards,
    Plamen.M
    SiteGround Tech Support Team

    Thread Starter Bloke

    (@bloke)

    I don’t have anything in wp-content/cache/
    Also now I have changed the theme in the database and there is no change.

    • This reply was modified 4 years, 2 months ago by Bloke.
    Plugin Support Plamen M

    (@plamenm)

    The https enforce function of our SiteGround Optimizer plugin does 2 things, as described:

    Configures your site to work correctly via HTTPS and forces a secure connection to your site. In order to force HTTPS, (1) we will automatically update your database replacing all insecure links. (2) In addition to that, we will add a rule in your .htaccess file, forcing all requests to go through encrypted connection.

    So, you should search for and replace all occurrences of your site’s domain:

    https://domain.tld
    or
    https://www.domain.tld

    and replace them with your localhost’s address via http://

    You should also check the .htaccess file. If the redirect continues after these steps, you should discuss this with your site developer and see where else and how https might had been configured in your site.

    Regards,
    Plamen.M
    SiteGround Tech Support Team

    Thread Starter Bloke

    (@bloke)

    I was able to correct it. I knew it must be something simple because I have 3 other sites with the same set up. I downloaded the htaccess file and edited it, reviewed the errors, used another theme, cleared the active plugins in the database to get into the admin panel. Then used a search and replace plugin and its ok now.

    Plugin Support Plamen M

    (@plamenm)

    I am very glad that you managed to resolve the issue, @bloke .

    Enjoy our plugins.

    Regards,
    Plamen Martinov
    Tech Support Supervisor
    https://www.SiteGround.com/

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

The topic ‘Cache issue login to WP-admin on localhost’ is closed to new replies.