WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Subdirectory Installation (6 posts)

  1. tecnoduque
    Member
    Posted 2 years ago #

    I know this may be asked several times, but after lots of search I wasnt able to solve it.

    I've got a domain.com, when I installed WP in that directory everything worked fine. Now I need to set up a /blog subdirectory (wich is already created) and I uploaded the whole wordpress folder there, with the same wp-config.php file.

    If I go to mydomain/blog/wp-admin/install.php
    I get that wordpress seems to be already installed, that I should erase my data base (?)
    It's like style-less and I've got the access link, wich leads me to blog/wp-login.php (wich is also style-less), and no matter if I try to login or register I get the followin errors:

    PHP Error Message

    Fatal error: require() [function.require]: Failed opening required '/home/********/public_html/wp-includes/load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/********/public_html/wp-settings.php on line 21

    now what?

    thanks in advance.

  2. Tim S
    Member
    Posted 2 years ago #

    Hi technoduque,

    If you copied the files over from your previous installation, they are referencing the style-sheets and templates from the previous installation on the root. I would do a fresh install of WordPress on the sub-directory. Then if you need to tie in the old database you can do so in the wp-config.php file.

    If you dont need to use the previous database, then just do a fresh installation of WordPress with a new database.

    I hope this helps!

    Tim

  3. ChristiNi
    Member
    Posted 2 years ago #

    Hi tecnoduque,

    Sorry to hear you're having trouble installing WordPress. If I understood you correctly, you uploaded the same wp-config.php file to the sub folder that you're using in the document root? I'm not sure if you're wanting to move everything from the document root to the sub folder or want a separate installation of WordPress, so I'll give recommendations for both.

    If you're moving your installation to the subfolder, you'll want to update your configuration settings to reflect the subfolder, so you'll want to set your site url in wp-config.php to domain.com/blog. Here are the full instructions from the codex for Moving WordPress

    If you're wanting a second installation, you should start with a fresh install of WordPress (not a copy of what's already installed in the document root).

    Hope this helps!

  4. tecnoduque
    Member
    Posted 2 years ago #

    thanks a lot!

    The errors I'm getting are with a fresh new installation, and the only file I kept is the wp-config.php, because of the DB data, which is gonna be the same I was using.

    and thanks for the link, but doesn't apply, cause I cannot login to set up anything from inside the WP envrioment, gotta be something to do editing the PHP files im uploading to the /blog subdirectory.

    I hope anybody can help me!

  5. ChristiNi
    Member
    Posted 2 years ago #

    Hi tecnoduque,

    I would recommend checking the WP_HOME and WP_SITEURL in your wp-config.php file. These can also be set in your database, but since you have an existing site still running from the database, I wouldn't recommend changing them there. Instead, add the following lines to your wp-config.php file:

    define('WP_HOME', 'http://yourdomain.com/blog');
    define('WP_SITEURL', 'http://yourdomain.com/blog');

    Good luck!

  6. tecnoduque
    Member
    Posted 2 years ago #

    thanks a lot ChristiNi, playing around with the config file I solved it.

    cheeers

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.