• Hi,

    I want to do the following:

    I already have a wordpress running in the root. I want to create a sub-directory “premium”, it’s supposed to be a exact copy of the original site, except a few changes in the layout and it will be password protected by apache. I tried doing that, but in the admin section of the “premium” install the links to posts goes to the original site, like site.com/news and not site.com/premium/news. Also, the “premium” index loads the design but it the content is 404. The “premium” version uses the same database and the same tables of the original, and wp-config is also a copy.

    So, I want to know, how can I fix that.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    First, I don’t really see why you need to have two different WordPress installations if all you want is to have “premium” content available only to some users, along with “a few changes in the layout”. With a few tweaks, you can achieve this with just one WordPress instance.

    Anyway, to answer your question. Taking what you’ve written literally, the problem seem to be that you’re running the two different blogs from the same WordPress database *tables*.

    This is not possible. You can use the same database, but you should use different table prefixes for each blog (so that different tables will be created for the two blogs).

    To do this, go to the wp-config.php file for the second “premium” installation, and change the database table prefix to anything other than wp_, as this is already used for the first blog.

    After that you need to run the WordPress installer, and if Mr. Murphy doesn’t come around, you should have a fresh WordPress.

    Thread Starter navis27

    (@navis27)

    I tried to change the prefix but if I do so the database is empty, I need it to be the same as the original.

    I can’t use the same installation to do this because I use squid in my server and it caches the pages, so a registered user would have to press f5 to “login”.

    You need to install WP again in the premium directory. These two installations have to be completely seperate entities to make this work.

    Like gappiah says, both wp-config files need to be different (one containing the wp_ prefix, the other the premium_ or whatever prefix). You can’t just copy the files on your server to the new directory, you have to go through the 5 minute install again to make this work.

    Thread Starter navis27

    (@navis27)

    I did change the table_prefix.

    Then, I did the install again and it wasn’t 5 minutes, it was just 1 or 2 steps then it created an admin password and nothing else :/

    Thread Starter navis27

    (@navis27)

    Also, when you change the table_prefix it just creates new empty tables in the same database :/ I need to use the same tables…

    EDIT: sorry I should have to edit the last post, i did not try to bump the post or anything like that

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘2 wordpress sharing the same DB, one for members only (apache)’ is closed to new replies.