WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to get index.php back? (3 posts)

  1. ann-charlotte
    Member
    Posted 6 years ago #

    I installed WordPress 2.2 through Fantastico (automated installation at my webhost Bluehost) a few days ago and it worked great. I haven't had time to remove my old blog system Pivot, so when a user left a comment in the old Pivot system, the index.php (the frontpage with all my blog posts, I mean) was overwritten by Pivot and my new WP posts disappeared!

    How can I get WordPress to generate a new index.php again? Even if I go to the WP dashboard and create a new post, WP won't make a new index.php. In Pivot you have a "rebuild all files" button, is there something similar you can do in WP?

  2. Jeremy Clarke
    Member
    Posted 6 years ago #

    No, the index.php file in WordPress is extremely simple and just loads the rest of the code. You should either re-install your wordpress with fantastico (i'm not very familiar with the process there), or, if you have normal ftp access, you can just re-upload the index.php file from the downloadable version of wordpress (download it then only upload the index.php file).

    http://wordpress.org/download/

    (make sure you use the index.php file from the same version of the wordpress that you have installed on your server, you can see the version at the bottom of all the admin pages).

    Really, you should also get rid of the old system ASAP. If it is overwriting the index of your wordpress blog then the two systems aren't going to play nicely together. It might be worth finding a couple of super important files in pivot and renaming them so that it doesn't render new pages ever... One thing you may also want to check is if pivot created an index.html rather than index.php file in the main folder. If it did then it didnt overwrite the wordpress file and you can just erase the index.html file and wordpress should start working.

  3. ann-charlotte
    Member
    Posted 6 years ago #

    Hello Jeremy and thank you for your very speedy reply!

    I did download a fresh WordPress installation and uploaded the index.php file that was located inside the wordpress directory but then I got the following error:

    Warning: main(./wp-blog-header.php) [function.main]: failed to open stream: No such file or directory in /home/maintena/public_html/ac/index.php on line 4

    Warning: main(./wp-blog-header.php) [function.main]: failed to open stream: No such file or directory in /home/maintena/public_html/ac/index.php on line 4

    Fatal error: main() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/maintena/public_html/ac/index.php on line 4

    Then I remembered something about manually editing index.php if you moved the core files to their own directory so I changed the path and now it works again. The wp-blog-header.php file is located inside a directory named wp and I forgot about that manual change.

    I will definitely remove the old blog system, I didn't intend to have Pivot and WP fighting in the same directory, I just didn't fix it straght away. But now I will.

    So the problem is now resolved (whew!). :) Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.