• cooltouch

    (@cooltouch)


    I have a subject specific blog on my website, and decided I’d like a general topic blog as well, so I decided to change the directory name of the subject specific blog to one that is appropriate to the subject, then used its old directory name for the new blog. E.g., original blog name was /blog. I changed the directory name to /cafeblog without moving or changing any files. Then I created a new /blog directory and installed WP into the new directory.

    So now, when I try to access the old blog I get this message:

    “Error establishing a database connection”

    I suspect that one or more files are looking for the old directory name. I’m hoping that I can just go in and edit these files and have my blog up and running again. But after spending about a half-hour paging through dozens of .php files, I’ve yet to uncover which file(s) I need to edit.

    Can anyone here tell me what I’ll need to do to correct this problem?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Roy

    (@gangleri)

    Try with reading these two articles to see what you should have done:
    codex.wordpress.org/Moving_WordPress
    codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Thread Starter cooltouch

    (@cooltouch)

    Thanks for the links. Unfortunately neither one addresses my specific problem. The first one is closest, but deals with moved files, not changed directory names. Close, and maybe it might work, but I have no idea how to implement a “symlink” or where I’m supposed to input the command “ln -s /path/to/new /path/to/old”. When it comes to Unix/Linux, I am a total noob. I know basic FTP procedures and commands and setting file permissions, and that’s about it.

    What I did try (which didn’t work) was to rename the directory back to its original name, i.e., from cafeblog to blog. This didn’t work either. I got the same message:

    “Error establishing a database connection”

    I’m puzzled why it doesn’t work with the original directory name reinstated.

    I sure hope there’s a fix for this. I have over a year’s worth of posts there, plus an interface I customized back when WP was still using HTML (I don’t speak php).

    Thread Starter cooltouch

    (@cooltouch)

    Okay, now I think I’m screwed. I used the tutorial I found here:

    http://www.tamba2.org.uk/wordpress/site-url/

    Does an excellent job of hand-holding regarding changing a directory name for a WP installation. And I also belatedly understand the workings of WP better now. Here I was, all this time, looking for basic settings within the WP files, when it turns out these settings were located within the php database.

    I upgraded the blog that now doesn’t work before I installed the new one. When I upgraded it, I also decided to change the directory listing. After that was complete, I installed the new blog in the upgraded blog’s old directory. Apparently, however, the php database didn’t pick up on this, and it looks like it overwrote the data from the old blog, because there is no database for the old blog now.

    Since I didn’t even know of, much less appreciate, the existence of this original database, obviously I didn’t back it up. So, I guess I’m well and truly screwed, huh.

    Will it be possible to reinstall WP in the new directory using Fantastico? I realize I will most likely have lost all post data, but I’m hoping that the site appearance will have survived.

    iridiax

    (@iridiax)

    …but deals with moved files, not changed directory names.

    That is moving as far as WordPress is concerned.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I think I messed up’ is closed to new replies.