• Hi, I am new at this, my problem is :
    I added wp to my main domain as I could not add it directley to my sub-domain. As I would like to run wp with one theme on my sub-domain and another on my main domain.
    Is this possible,I have copied the wp to my sub-domain. but if i change the theme in my sub-domain it auto changes it in my main domain too.

    kind regards,

    Ian

Viewing 12 replies - 1 through 12 (of 12 total)
  • Are you using the same database? If so, that would be the cause.

    Ian, as miklb says above, if you’re using the same database it will cause you problems. Are you looking to run the same information on bothe the domain and sub-domain with different themes, or two separate blogs?

    If two separate blogs:

    In the wp_config.php file there’s a setting that asks for the table prefix. As standard it says “wp_”.

    If you change that for the sub-domain then you can run two separate instances of wordpress using the same database, referencing two different table sets.

    Does this help/make sense?

    Collin

    Thread Starter ian17

    (@ian17)

    Thank you both, yes i am using the same database,
    As I am new at this.so if i copy the existing table and then rename it, that should do the trick

    kind regards,

    and thanks for your help

    Ian

    Thread Starter ian17

    (@ian17)

    Sorry, another question about this.
    by changing the db prefix to blog1 for example on my sub-domain, i get an error: wp not installed, if I re install it i loose everything already posted.
    Please advise,
    Do I have to do anything in Mysql ?

    kind regards,
    Ian

    To have WP installed in the root AND in a subdomain you nedd 2 (two) separate WP installations.

    Thread Starter ian17

    (@ian17)

    I have 2 installations, weel kind of, when i installed wp on my main domain, I copied it and pasted it in my sub domain. My server works with installatron and this allows me only to install on main domains.

    Was this the wrong thing to do ??

    I don’t know why your server would do that – if you can install it in the root (main domain), you should be able to do that anywhere. I am talking about manual installations, not “one-click” gizmos that hosts offer…

    You cannot just copy the WP files to another location. You need separate database tables for the second installation, by changing the table prefix (as adviced above) AND running the installation script. If the two sets of WP files are connected to the same database tables (as I suspect it is the case) – you are looking for troubles…

    Thread Starter ian17

    (@ian17)

    Oke, and if I delete WP from my main server, and thn install again from the installatron on my main server, then cahange the table prefix, anf then tun install.php.
    Does this sound OK?

    I do not knoe why i can only install on the main server, I think it is because I am allowd to have as many sub- domains as I want as long as I do not exeed a certaind bandwidth usage, Through installatron I can choose from 50 Programs, WP is only 1 of them, from blogs to forums to online shops ext.

    kind regards,

    Ian

    No, that doesn’t sound right. You will need to install WP in both your home directory, and the subdomain. If you intend on using two different themes, you will need to change the prefix for one of the install in the config.php file.

    I’m not familiar with “installatron” so I can’t say what the process is with installing scripts.

    Truthfully, if you are going to host your own blogs, you should really familiarize yourself with FTP and learn to do this manually. Installing_WordPress is a good place to start.

    Thread Starter ian17

    (@ian17)

    Thanks for the reply, I have just downloaded my domain and subdomain through ftp to my local machine. does it matter in which WP installation I change the db prefix, I would prefer to change the one on my main domain.

    sorry for beeing such a newbee at this, I do apreciate the help,

    Ian

    Everyone starts out a newbee at some point. That’s why the forums are here. It doesn’t matter which install you change the prefix on.

    You only need to alter the config.php file, no need to upload all the other files again.

    Thread Starter ian17

    (@ian17)

    Thanks again, I have got it. It works

    My thanks to miklb, moshu and Cornell_finch.

    great stuff,

    Kind regards,

    Ian

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘using wp for main domain and a sub domain, please help’ is closed to new replies.