• laurenf

    (@laurenf)


    I forgot to change the URI of my blog before renaming it, and now I can’t login. I changed the name of the directory from “wordpress” to “blog,” and now when I type in my login info, I get 404 not found. Is there anything I can edit directly in one of the php files? I couldn’t find it in general options, config, etc, but I’m not so well-versed in this stuff. How can I show WordPress where my blog is so that it can load up the admin stuff? The blog itself shows up just fine for the most part, except that it isn’t linked to the theme…

    Help! Please! Thank you…

Viewing 6 replies - 1 through 6 (of 6 total)
  • https://www.tamba2.org.uk/wordpress/site-url/
    It’s in the database and if you have phpmyadmin, very easy to sort out ??

    Thread Starter laurenf

    (@laurenf)

    Thanks so much for your speedy reply… but yikes, I don’t have phpMyAdmin (I have a Pair.com account). Any way to edit it on the command line without ruining everything?

    Cypher

    (@cypher)

    Does your webhost give you SSH/Telnet access? If so, you can indeed do it through the command line using MySQL directly, but you will have to use a few SQL commands.

    Regards

    Thread Starter laurenf

    (@laurenf)

    Yes! But is there any way you could provide me with those SQL commands? I’m only beginning to be comfortable using SSH, but I really don’t know how to do anything without some serious hand-holding. Any help you could provide would be greatly, greatly appreciated.

    Cypher

    (@cypher)

    OK..here we go..;)

    1) Look at the file wp-config.php to determine what your username (DB_USER), password (DB_PASSWD) and database (DB_NAME) name is. You will use the contents of DB_USER, DB_PASSWD, and DB_NAME wherever I call it out.

    2) Login to mysql with: mysql -uDB_USER -p
    Enter your DB_PASSWD when prompted

    3) Once inside mysql:
    3.1) mysql> show databases;
    3.2) mysql> use DB_NAME;
    3.3) mysql> show tables;
    3.4) mysql> select option_value from wp_options where option_name = ‘siteurl’;
    – This will now show you what WP thinks your URL is. If it’s correct, leave it be. If not, update it:
    3.4.1) mysql> update wp_options set option_value = ‘https://my.new.blog.com/’ where option_name = ‘siteurl’;
    3.5) mysql> select option_value from wp_options where option_name = ‘home’;
    – This will now show you what WP thinks your URL is. If it’s correct, leave it be. If not, update it:
    3.5.1) mysql> update wp_options set option_value = ‘https://my.new.blog.com/’ where option_name = ‘home’;

    You can re-run 3.4 and 3.5 to confirm your changes.

    Finally type “exit;” to get out of MySQL and see if the changes make your blog work again.

    Regards

    Thread Starter laurenf

    (@laurenf)

    Thank you SO much!!! It worked like a charm.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Forgot to change URI before renaming — HELP!’ is closed to new replies.