• I’m about to upgrade an old version of WP (2.1.3).

    Questions I have (please, any help appreciated):

    I want to add a few subdomains to my site, as in:

    http://www.myblog.com
    sub1.myblog.com
    sub2.myblog.com

    each with their own copy of WP, so I can use slightly different themes in the subdomains. But I would like them all to access the same database and the same blog posts (I would only be writing and editing these posts from the main domain, just accessing the files from the subdomains).

    Is this possible? Any advice?

    Second Q:

    My site has been hacked into, and there are extraneous admin users, and a superuser admin that I cannot seem to get rid of. How do you scrub admin users from the database, if they are not showing up when you search users (they seem to be invisible)? I have the user id # for the superuser, but am unsure how to get rid of it. I’d like to do this before I upgrade, for obvious reasons, but maybe newer versions of WP solve this problem?

    Third Q:

    For the main site, I’m planning on installing the newest WP into a separate directory, and then switching over, and then deleting all the old 2.1.3 files and plugins. Is this the best way to scrub the site, or is there another (better) way.

    Any help mucho appreciated…

Viewing 6 replies - 1 through 6 (of 6 total)
  • 1. If you upgrade to 2.8, you’ll have access to the body_class() which will allow you to create fairly specific CSS for each kind of page – right down to individual post styling. All from within a single WP install. Alternatively, you could modify header.php to load different stylesheets depending upon the page type, catgeory etc. via conditionals.

    2. See:
    http://codex.wordpress.org/FAQ_My_site_was_hacked
    http://wordpress.org/support/topic/268083#post-1065779
    http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/

    3. Do you want to re-use your existing content in any of the 3 different “sites”?

    Thread Starter bugreporter123

    (@bugreporter123)

    esmi –

    Thanks for the advice.

    1. I will check out the links, thanks. What I really want to do is have a different header image, and possibly different sidebars. The background and type styles will likely stay the same (or very similar). In the old WP, this didn’t seem possible (with some sort of IF…THEN type of statement, checking on which page it was loading) within the theme pages. But a different header image is beyond the abilities (I think) of CSS. I’m no CSS expert, so I could be wrong about that, though.

    2. Thanks, I will check the links. Most of the links seem to deal with the damage done to the WP files, though. The users (I believe) are stored within the database. I haven’t used SQL in a long time, so that’ll probably take some learning time, but it looks like that may be the only way to deal with the problem. I know of an easy search to find these users (searching on “admin” for instance, most are named things like “admina… adminb… adminc…” etc.), but I don’t know how to find them using the WP admin user interface (may not even be possible). I do the search, and the users are “invisible” — reports “20 users found” but none appear in the resulting list.

    3. Yes, I want to use an existing database in all three of the different “sites.” But I’ve heard that just doing an upgrade of the existing WP directory on the server won’t find (and delete) extraneous files. So I thought, for the main site, I’d just set up a new directory and then move my (clean) theme pages into it, and install new versions of my plugins. Then I can change the file (htacess? I forget.. the one at the root html level) to point to the new directory. Does this sound feasible? It’ll allow me to get everything up and running, and then switch the whole thing over without interruption of service. I think.

    Anyway, thanks for taking the time to answer me, I really appreciate the help!

    🙂

    1. Entirely possible. The link I gave above for body_class is actually a post about using it to change headers. The sidebars can be handled through conditionals and `<?php get_sidebar(‘foo’);?> which will load sidebar-foo.php instead of sidebar.php. In theory, you can have as many of these alternative sidebar files as you want.

    2. I think the last link references cleaning out the db. At least one of the recent hacks involved inserting additional (but invisible) admin users, so there should be plenty of advice around.

    3. You might want to have a look at http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    You can install and leave WP in a sub-dir but run it from root.

    Thread Starter bugreporter123

    (@bugreporter123)

    1. OK, I will check out body_class, it sounds like what I’m looking for. The sidebars, I forgot — I already have one alternate sidebar with a custom name, so “duh” — I should have thought of that! But I’ve always gotten stuck trying to swap header images, never got to the point of dealing with the sidebars in what I was attempting to do. That’s my excuse for the stupid question, at any rate (thanks for being patient with me…)

    2. I will check it out. I will search for invisible admins to find more exact info if I need it. I don’t want to do the upgrade until I’ve scrubbed the database, for obvious reasons.

    3. I’m still not sure if I need more than one copy of WP (I’ve got the disk space, wouldn’t really be a problem). I will download a new copy and play around with it in a subdomain, and see what happens.

    My main question, though, is “am I going to break the database by pointing more than one copy of WP at it at one time?” which seems to be OK, from everything you’re saying (if I’m wrong, please let me know!!)

    I think this answers enough of my questions to get started. If I have further, more detailed questions, I will post them as separate questions here in the forum. Just wanted to thank you for all the help, since I know just enough PHP and just enough about servers to totally mess everything up — so I was trying to avoid that in advance!

    Thanks again.

    My main question, though, is “am I going to break the database by pointing more than one copy of WP at it at one time?”

    You won’t break it as such. The only issue you have to consider is server load. It’s entirely possible to max out a server with a single install – especially if you’re using a lot of plugins that each make frequent queries. So, in theory, this risk is slightly greater with 2 or 3 installs running off a single db. But if you err on the cautious side with plugins and aren’t pulling in very high traffic you should be OK. Just keep an eye on it and, if traffic does start to grow, consider using a caching plugin.

    Thread Starter bugreporter123

    (@bugreporter123)

    Don’t think traffic load will be a problem. I’m a newbie here in the forum, so don’t know how to mark this thread as “resolved” but if any moderators see this, please help me out and do so.

    As I said, I will post any other problems I have here as I encounter them.

    Thanks again for all the help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘upgrade questions’ is closed to new replies.