skip to Main Content

This is my site URL https://www.test.com/, Here I installed a WordPress theme having URL https://github.com/test.com, the problem is this when I want to open the wp-admin (means when I write www.localhost/test/wp-admin) it redirects to localhost. Please help me to solve this problem, I am in trouble.

2

Answers


  1. Go to wp-config.php or functions.php and put this

    update_option( 'siteurl', 'https://test.com' );
    update_option( 'home', 'https://test.com' );
    

    Run website
    Then remove it from wp-config or functions.php

    Login or Signup to reply.
  2. Please try to search-replace in your DB all the strings with "localhost".
    You can do that with an export of the MySql db in a file .sql, open it with Visual Studio Code (or any other text editor) and replace all the occurrencies with the new URL.
    This is the standard way to migrate a local website in a live domain.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search