WordPress.org

Ready to get started?Download WordPress

Forums

index.php is creating a load issue on the server (4 posts)

  1. firouz47
    Member
    Posted 6 years ago #

    Hi everyone!
    according bluehost following index.php is creating a load issue on the server
    the index.php is:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./info/wp-blog-header.php');
    ?>

    although WP 2.3.2 have been installed on ./info and it works fine
    I did not have any problem before
    I did not make any changes on my blog, only added a few new posts each week, I don't what could be caused the problem
    any idea& tips??

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    This tells us nothing, *ALL* WordPress traffic goes through the index.php.

    You need to figure out what you have that is actually creating the load issue.

  3. firouz47
    Member
    Posted 6 years ago #

    but how to figure up what caused load issue ?
    my main index.php looks as following, I wonder if this construction
    could caused problem?

    <?php get_header(); ?>

    <div id="content">
    <div id="content-main">

    <?php $posts = get_posts( "category=8&numberposts=14" ); ?>
    <?php if( $posts ) : ?>
    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    <h2>" rel="bookmark" title="<?php the_title(); ?>">
    <?php the_title(); ?>
    </h2>
    <div class="entry">
    <?php the_content('» » »');?>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>
    <?php $posts = get_posts( "category=3&numberposts=5" ); ?>
    <?php if( $posts ) : ?>
    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    <h2>" rel="bookmark" title="<?php the_title(); ?>">
    <?php the_title(); ?>
    </h2>
    <div class="entry">
    <?php the_content('» » »');?>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>

    <?php $posts = get_posts( "category=4&numberposts=5" ); ?>
    <?php if( $posts ) : ?>
    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    <h2>" rel="bookmark" title="<?php the_title(); ?>">
    <?php the_title(); ?>
    </h2>
    <div class="entry">
    <?php the_content('» » »');?>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>

    <?php $posts = get_posts( "category=7&numberposts=24" ); ?>
    <?php if( $posts ) : ?>
    <?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
    <h2>" rel="bookmark" title="<?php the_title(); ?>">
    <?php the_title(); ?>
    </h2>
    <div class="entry">
    <?php the_content('» » »');?>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>

    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    but how to figure up what caused load issue ?

    Well, looking at what pages get the most hits on your site would be a start. Without knowing what people are looking at on your site, you can't figure out how to reduce load on it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags