Support » Fixing WordPress » How to have wordpress back to up and running

  • Hi

    By mistake, I changed wordpress URL and domain in general settings from http://www.mydomain.com/wordpress to http://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','http://example.com');
    define('WP_SITEURL','http://example.com');

    The instructions can be found here.

    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','http://example.com');
    define('WP_SITEURL','http://example.com');
    
    /**
     * The base configurations of the WordPress.
    ........

    I would suggest following code which is more error prone

    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);

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

    Moderator Jan Dembowski

    (@jdembowski)

    Brute Squad and Volunteer Moderator

    You really want to give this a try again.

    http://codex.wordpress.org/Changing_The_Site_URL#Edit_functions.php

    Using the define is only a temporary work around.

    Hi

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

    Moderator Jan Dembowski

    (@jdembowski)

    Brute Squad and Volunteer Moderator

    Can you provide a link to your site?

    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)

    Brute Squad and Volunteer Moderator

    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.

    http://codex.wordpress.org/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.

    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

    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?

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

    esmi

    (@esmi)

    Forum Moderator

    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.