WordPress.org

Support

Support » How-To and Troubleshooting » Why do I have to include /wordpress as part of my url now?

Why do I have to include /wordpress as part of my url now?

  • 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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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.

    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.

    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

    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

    ?>

    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

    ?>

    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

    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!!

    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

    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’);
    ?>

    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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Why do I have to include /wordpress as part of my url now?’ is closed to new replies.
Skip to toolbar