• Hi!

    I’m running Kubuntu Linux and I decided to install WordPress from the repositories. I’ve been running a copy of wordpress on another server, but it was going down so I copied the files, took a sql dump of the database and used that. I got my blog running nicely.

    Then however, because the installing was so easy, I decided to host my friends blog too. This blog was hosted on the same server as my blog was hosted before, and on the same database. So, I made a copy of the files and just edited the prefix to point to his part of the database. His blog was now running nicely. This is when I noticed that my own blog was now using the same part of the database that my friend’s blog.

    Apparently both of the blogs use /etc/wordpress/wp-config.php as the config file. Strangely, when I edit either of the wp-config.php files located at /var/www/blog (my friend’s blog) or /usr/share/wordpress (my own blog, I only made a link in apache’s conf), the /etc/wordpress config file edits too. So, whenever I change the prefix value in any of these three wp-config.php files, both of the blogs move to use the same part of the database.

    Does the database point these blogs to use /etc/wordpress/wp-config.php, or some file? Or is it something else?

    ps. I tried Googling for the answer, as well as searching this forum. Searching for “two blogs” or anything similar proofed to be useless.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I don’t know anything about servers.
    However, I run several blogs from the same database with different table prefix – but I never ever encountered a similar issue.

    What about the site_url and home values in the database tables for each blog?

    Thread Starter pasipasi

    (@pasipasi)

    Those two don’t matter, I think. I need to get these blogs to use the wp-config.php file that is placed in their own folder, not the one that is available at /etc/wordpress. I’ve been looking around the database (and searching with ‘config’) and I can’t find a table that would help me.

    Whatever you say. These kind of “problems” usually come up in the case of self-appointed servermasters… who think they know everything better.

    Thread Starter pasipasi

    (@pasipasi)

    Those values are different to begin with. I guess I’ll go ask if anyone at the ubuntu forums knows about this issue.

    Does the database point these blogs to use /etc/wordpress/wp-config.php, or some file? Or is it something else?

    Nope. It’s the other way around. Your wp-config file points to the datebase. It also displays the username and password used to connect and the database it has to connect to.

    Thread Starter pasipasi

    (@pasipasi)

    I fixed it. I’m no expert in this, not yet least 🙂

    When I made a copy of the blog on me desktop and tried to edit the files in a graphical editor, I noticed that the wp-config-file is only a link. I’m not sure why, but when I did a copy of /usr/share/wordpress (where it was originally installed by aptitude), it copied all the other files, but made a link to /etc/wordpress/wp-config.php. Therefore all the wp-config files I copied later on were just links too. I made a new wp-config file from scratch to every blog and now it seems to be working.

    Next time I’ll know to look for a link if this happens. I’m pretty new to Linux, and I’ve never seen these things before.

    A sym link allways points to a real file. If this was the way it was set up, it wouldn’t have worked in the old situation.
    Every installation, has to have an own wp-config.php, in order to define database connections.

    I would install the both blogs in the www-root, different sub directories, linked to different (sub)domains.

    Glad to see you have got it working, though.

    That install location looks pretty wierd to me for a linux install. WP is not designed to be run as just another app in any environment. It is server side software. Locally on linux that would suggest installing LAMPP then installing in htdocs as per usual. There is no need to make a big ubuntu drama out of this.
    Nearly all WP installs are hosted on linux anyway.

    Thread Starter pasipasi

    (@pasipasi)

    For any future reference, I suggest no one installs wordpress from the repositories. It installs the files under /usr/share/wordpress, makes a link to /etc/wordpress/wp-config.php and you’re supposed to make another link in apache.conf to make apache look for the files in /usr/share rather than the htdocs directory.

    Not knowing this, I edited the linked wp-config.php and simultaneously edited all the wp-config files I had copied. It would have been much easier to download the package and extract it to where ever I want, and I wouldn’t have had any trouble in the first place. I feel sorry for making this thread and troubling you guys (and gals?). 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Problem with two blogs’ is closed to new replies.