• Hello,

    So I am working for another developer and they have a “sandbox site” where they would like sub-contractors to develop new sites. This project requires that I log into the developer’s development site and then set up a subfolder under httpdocs entitled “client” (just want to maintain their privacy) and then under that subfolder, ANOTHER set of subfolders named “concept1” “concept2” and “final” respectively.

    Since they want to be able to track changes, ideally I would like to install WP into each folder only changing the table prefix in the wp-config.php file. I also found some advice about adding to the file like so:
    define(‘WP_HOME’,’http://example.com’);
    define(‘WP_SITEURL’,’http://example.com’);
    I think I would change http://example.com to the full path of the installation, No?
    http://example-development.com/client/concept1

    I have set up subdomains before and simply changed the table prefix for each installation. I have asked the development company’s tech to create a database at this location:
    http://example-development.com/client/
    and I am hoping that will allow me to create a development environment where I can have 3 installations of WP in 3 folders all located in a subfolder on the developer’s server.

    Whew!

    I have been trying to work on this, but there are so many factors involved that I just wanted to check in and see if anyone else has gone through this. Again, I can’t tell if I’m over-thinking or under-thinking on this one.

    thanks!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • I think I would change http://example.com to the full path of the installation, No?
    http://example-development.com/client/concept1

    Yes. That’s how I have things set up on my development server. Should work for you too. I’ve also done something similar inside an .htaccess protected directory.

    I have asked the development company’s tech to create a database at this location:
    http://example-development.com/client/…

    I don’t think your database really cares about web-server’s directory structure. Its a different system running on a different port. Maybe I’m wrong…

    Thread Starter jennsweb

    (@jennsweb)

    Thanks apljdi!

    That idea worked. But now, when I go to create a second WP installation in the folder marked Concept2, I get an error 404 message. I changed those urls to be: http://example-development.com/client/concept2 and then changed the table prefix to: con2_ (which is what I’ve done in the past with subDOMAIN installs, keeping the DB info the same)

    It’s doubtful that the developing company will let me access their cpanel for this, or an htaccess file. I may try to make this work on just the one installation, since the work-around may be too crazy.

    If you can write to a directory you can create an .htaccess file in it. Whether the server respects htaccess directives is another issue, seems like most LAMP servers do though.

    You’ll have to copy a new set of WP files into each new concept directory. You did that right? You didn’t just change the path variable?

    If you are doing a lot of this, maybe WPMU would fit better?

    Thread Starter jennsweb

    (@jennsweb)

    I downloaded wp and then copied and pasted those files into each folder. Then, I changed the wp-config-sample.php in each folder and saved as wp-config.php with the different file paths before uploading each folder.

    Now, I’m trying to edit the stylesheet online and I get this message:
    Warning: fopen(C:\Inetpub\vhosts\nexteon-development.com\httpdocs\synergy\concept1/wp-content/themes/pyrmont-v2/style.css) [function.fopen]: failed to open stream: Permission denied in C:\Inetpub\vhosts\nexteon-development.com\httpdocs\synergy\concept1\wp-admin\theme-editor.php on line 54

    Warning: Cannot modify header information – headers already sent by (output started at C:\Inetpub\vhosts\nexteon-development.com\httpdocs\synergy\concept1\wp-admin\theme-editor.php:54) in C:\Inetpub\vhosts\nexteon-development.com\httpdocs\synergy\concept1\wp-admin\theme-editor.php on line 69

    I’ll try and change the stylesheet in Dreamweaver and upload that.

    …wp-config-sample.php in each folder and saved as wp-config.php with the different file paths before uploading each folder.

    What do you mean? What part of wp-config needs a path other than a hostname?

    Error #1 means that the file permission are such that WP can’t edit the files. Not a big deal in my opinion. I hate editing without my beloved Kate and I especially hate editing a live site. Your host might allow you to adjust the permissions though.

    The second error is more interesting. I’m not sure what to say about it. It looks like maybe a corrupt file?

    the second error is a result of the first error. Nothing else.

    Thread Starter jennsweb

    (@jennsweb)

    Hi again,

    Things seem to be going well with editing the theme files in dreamweaver. By “changing the file path” I meant these 2 parts of the code:
    define(‘WP_HOME’,’http://example-development.com/client/concept2′);
    define(‘WP_SITEURL’,’http://example-development.com/client/concept2′);

    in addition to changing the table prefix to ‘con2_’

    Thanks,
    Jenn

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Trouble installing WordPress in a subfolder’ is closed to new replies.