• Accidentally changed the site address URL in my WordPress settings, and now I’m unable to access the dashboard. Whenever I try to log in, I’m redirected to the viewing site instead of the dashboard.

    Could you please provide me with instructions on how to regain access to my WordPress dashboard?

    My website URL: https://coolhubs.dk/wordpress/wp-login.php

    Reference images Download link.

    https://fromsmash.com/Q20EktsPE2-dt

    I appreciate your urgent assistance in resolving this issue.

    Thank you and kind regards,

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @dessinerwebsites

    Add the following two lines of code to the top of the wp-config.php file after replacing https://www.example.com with your site URL, then save the file.

    define('WP_SITEURL', 'https://www.example.com');
    define('WP_HOME', 'https://www.example.com');

    That’s all, please try accessing your WordPress Admin panel now.

    @dessinerwebsites

    Changing the URL settings in WordPress can indeed lock you out of the Dashboard. Fortunately, you can override those values by adding some constants in wp-config.php file. Since the process is a bit technical, I’ll provide step-by-step instructions. You’ll need to access your website’s hosting control panel to do this or you can use FTP/SFTP as well.

    Here’s how you can do it:

    1. Access your WordPress files. You can do this via FTP, or through a file manager in your web hosting control panel.
    2. Find the wp-config.php file. It’s usually in the root directory of your WordPress installation.
    3. Open wp-config.php in a text editor.
    4. Add the following lines of code towards the top of the file, just after the <?php line replacing http://myawesomesite.com with your site’s URL:
    define('WP_HOME', 'http://myawesomesite.com');
    define('WP_SITEURL', 'http://myawesomesite.com');

    5. Save your changes and close the file.

    After doing this, WordPress will use the URLs defined in wp-config.php instead of the ones in the database. This means you can’t change these settings from the dashboard unless you remove these lines from wp-config.php

    I hope this helps

    Thread Starter dessinerwebsites

    (@dessinerwebsites)

    @Gagan Deep Singh sir can you share me the screen shorts, where i should go and change, that would be really helpful.

    @dessinerwebsites

    Your site appears to be hosted on simply.com hosting platform. I do not have an account in there, to capture screenshots, but here are the steps you can follow:

    1. Log in to your Simply.com control panel: Open your web browser and navigate to Simply.com. Enter your username and password to log in.
    2. Access the File Manager: Once logged in, look for the “File Manager” option. This will allow you to access the files and folders of your WordPress installation.
    3. Navigate to your WordPress directory: The wp-config.php file is located in the root directory of your WordPress installation. This is typically the public_html but since you have it within a subdirectory, it will be at public_html/wordpress.
    4. Open the wp-config.php file: Once you’ve located the wp-config.php file, click on it and then click the “Edit” or “Code Editor” button (this might vary depending on the interface).

    Follow the rest of the instructions as stated in earlier reply

    Thread Starter dessinerwebsites

    (@dessinerwebsites)

    @niyaswp

     can you share me the screen shorts, where i should go and change, that would be really helpful.

    @dessinerwebsites

    You do not need to write the same message twice as we can see each others’ replies.

    Also, it’s not a good practice to share credentials like you did in the text file. So please remove it as soon as possible and ensure you change the database username and password later.

    As for why the Error establishing a database connection issue, you seem to have removed one line that defines the database name in the wp-config.php

    It should have been something like
    define( 'DB_NAME', 'database_name_here' );

    Add it back in the wp-config.php with the correct database name and it will start working.

    Also you only added one line

    define('WP_SITEURL', 'http://***********');

    Instead add both WP_HOME AND WP_SITEURL constants.

    Also, I see that you used http instead of https in the URL, please change it to https as well.

    Thread Starter dessinerwebsites

    (@dessinerwebsites)

    ok sir.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Urgent: Need help accessing WordPress dashboard after changing site address URL’ is closed to new replies.