• Hi

    By mistake, I changed wordpress URL and domain in general settings from https://www.mydomain.com/wordpress to https://www.mydomain.com . Now I cannot have access to my admin and login page any more. I tried to change functions.php in my theme folder and wp-config as some posts say but nothing worked out. Is there a solution to have my wordpress back to up and running? If not, can I recover the pages at least and install a new version of wordpress since I am using not the latest one?

    Please help.
    Thanks
    Max

Viewing 15 replies - 1 through 15 (of 33 total)
  • Did you enter this in your wp-config:

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

    The instructions can be found here.

    Thread Starter massy74

    (@massy74)

    Yes I did – but the pos does not say where I should put these lines into the wp-config file.

    Please advice.

    You can add it at the beginning of the file:

    <?php
    
    define('WP_HOME','https://example.com');
    define('WP_SITEURL','https://example.com');
    
    /**
     * The base configurations of the WordPress.
    ........

    I would suggest following code which is more error prone

    define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
    Thread Starter massy74

    (@massy74)

    I tried as you suggested but the page cannot be found.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    You really want to give this a try again.

    https://codex.www.ads-software.com/Changing_The_Site_URL#Edit_functions.php

    Using the define is only a temporary work around.

    Thread Starter massy74

    (@massy74)

    Hi

    As per my post, I did already try to change function.php but it did not work.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Can you provide a link to your site?

    Thread Starter massy74

    (@massy74)

    Can it make any difference? I think without the credetial login details you cannot do too much…

    I think the best option would be to reinstall wordpress. Right? Will I lose the pages? They should be in database so they are not going to be lost I guess.

    don’t reinstall.
    Clear browser cache.

    You are doing something wrong or you are not following the guidelines ??

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Can it make any difference? I think without the credetial login details you cannot do too much…

    Yes. For one it can help us determine the path your theme and theme’s functions.php file.

    Editing the functions.php file always works but it has to be ran for it to work.

    If that does not work then there’s always the option of manually updating your settings in the mysql database.

    https://codex.www.ads-software.com/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database

    Which is a little more trickier but if done carefully and successfully also does work.

    Thread Starter massy74

    (@massy74)

    I don’t know how to access to phpMyadmin to editing the database. Any other way around? I ask the question again: How about if I reinstal wordpress?

    Thanks
    M

    Thread Starter massy74

    (@massy74)

    Sorry – I did not read the message from Zakir. So I shall clear the cache…and try to edit either functions.php or wp-config..right?

    Thread Starter massy74

    (@massy74)

    I did it again – plus I cleared the cache first. It does not work.

    Use the functions.php method as Jan suggested.

Viewing 15 replies - 1 through 15 (of 33 total)
  • The topic ‘How to have wordpress back to up and running’ is closed to new replies.