WordPress.org

Ready to get started?Download WordPress

Forums

Why do I have to include /wordpress as part of my url now? (11 posts)

  1. jerryisaacs
    Member
    Posted 2 years ago #

    For several years I have been able to enter my website name as sbranch.org into the url bar of internet explorer, firefox, or chrome to access the site. But now if I leave off the /wordpress, the message pops up that the site is coming soon. Can anyone tell me what may have changed?

    Also, in the past, I could enter sbranch.org/chess to get to my php database, but now it is necessary to enter sbranch.org/chess.php

    Help would be much appreciated.

  2. itsonlybarney
    Member
    Posted 2 years ago #

    Is there an index.php file in the main directory that had the following contents:

    <?php
    /**
     * Front to the WordPress application. This file doesn't do anything, but loads
     * wp-blog-header.php which does and tells WordPress to load the theme.
     *
     * @package WordPress
     */
    
    /**
     * Tells WordPress to load the WordPress theme and output it.
     *
     * @var bool
     */
    define('WP_USE_THEMES', true);
    
    /** Loads the WordPress Environment and Template */
    require('./wordpress/wp-blog-header.php');

    As for the sbranch.org/chess, that might have something to do with a missing .htaccess file.

  3. jerryisaacs
    Member
    Posted 2 years ago #

    My index.php content is as follows:
    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

    I recently ran into a Permalink problem (all links had quit working) and thought I solved it with a .htaccess revision, as follows:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    However, my .htaccess file is now totally blank; I have no idea why it has changed, but the links are working well.

  4. itsonlybarney
    Member
    Posted 2 years ago #

    Go into the folder where the wordpress folder is, and add the contents of my previous post into an index.php file.

    index.php <--- Add to this file
    /wordpress
    /wp-admin
    /wp-content
    /wp-includes

  5. jerryisaacs
    Member
    Posted 2 years ago #

    I probably did something wrong because I get the same message when I do not put /wordpress into the url box. Content of my index.php file is now as follows:

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');

    /wordpress
    /wp-admin
    /wp-content
    /wp-includes

    ?>

  6. jerryisaacs
    Member
    Posted 2 years ago #

    I pasted your note into my index.php file as follows and tried again, but the problem persists.

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wordpress/wp-blog-header.php');

    /wordpress
    /wp-admin
    /wp-content
    /wp-includes

    ?>

  7. jerryisaacs
    Member
    Posted 2 years ago #

    If I put the index.php file in the root directory (the folder that contains the wordpress folder) I get the following parse error

    Parse error: syntax error, unexpected '/' in /home/content/97/4192497/html/index.php on line 19

  8. jerryisaacs
    Member
    Posted 2 years ago #

    Now I have tried to restore things by deleting the index.php file from the root directory and putting the following into the wordpress directory:
    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wordpress/wp-blog-header.php');

    ?>

    but now I get a fatal error

    Warning: require(./wordpress/wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/content/97/4192497/html/wordpress/index.php on line 17

    Fatal error: require() [function.require]: Failed opening required './wordpress/wp-blog-header.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/97/4192497/html/wordpress/index.php on line 17

    Now I'm really dead in the water!!

  9. jerryisaacs
    Member
    Posted 2 years ago #

    I have now restored my index.php file (original) into the wordpress directory and can access the website, but must include /wordpress in the url box

  10. jerryisaacs
    Member
    Posted 2 years ago #

    I believe that my problem is that I don't know where to insert

    /wordpress
    /wp-admin
    /wp-content
    /wp-includes

    into the following index.php file that is in my wordpress directory

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

  11. itsonlybarney
    Member
    Posted 2 years ago #

    Not knowing how your host has you set up, this is how it should look.

    index.php    <---- This is where the code goes. You may need to add it.
    wordpress/
        index.php   <---- This is the original index.php file
        wp-activate.php
        wp-blog-header.php
        wp-admin/
        wp-content/
        wp-includes/
        .....

    Alternatively, you could email your web hosting details, and I could fix it for you. My email is me@itsonlybarney.com

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.