Moved site to new URL - no longer automatically loads WP index.php

I’ve been troubleshooting this all day and I’m totally out of ideas.

I am running Wordpress 5.0.2, Pro 2.4.4, IIS 7, Windows Server 2016 and PHP 7.2.

I renamed the URL used by our Pro-based Intranet site today, following the instructions found on this site for migrating Cornerstone data as well as the WP-specific suggestions. If I access the new URL by typing the entire address (http://<sitename>/index.php), everything loads fine. However if I just type http://<sitename>/ the browser tries for a bit, then Internet Explorer says “This page can’t be displayed”, and FireFox gives a message that the page isn’t redirecting properly.

I have triple-checked the Default Document setting in IIS, and index.php is at the top of the list.

Here’s where it gets REALLY weird: If I replace the Wordpress index.php with a different php file, such as one just containing <?php phpinfo(); ?> then it loads perfectly using just the sitename without specifying index.php at the end.

Please help…I’m totally out of ideas! Thank you!

Hello Christine,

Thanks for writing in!

Please edit your index.php file and make sure that you are using this code:

<?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( dirname( __FILE__ ) . '/wp-blog-header.php' );

If this does not help, please provide us ftp details (only if your site is allowed to be viewed outside of your intranet). And if ever not possible, just check your virtual hostname for your intranet whether it was set up correctly. Also make sure to check that your site URL and WordPress address URL in Settings > General is the same with your WordPress dashboard URL.

Hope this helps.

Hi RueNel, thank you for your quick reply.

Yes, that is exactly what my index.php looks like. The site is not accessible outside of our location so you won’t be able to look at it directly.

I have checked the site and WordPress URLs in Settings-General and they are correct.

I’m not exactly sure what I should check for the virtual hostname, but if something was not set up correctly, would it have worked when I substituted a different (non-WordPress) index.php?

Hello Christine,

Please also check your REWRITE rule in the web.config file.
For more details, please check this out:

Hope this helps.

Sadly, nothing changed. I double-checked all the other hints in the article you linked to as well, and the home page still will not load without specifying index.php after the site name.

Oh for goodness sakes, I solved it. This is one of those things that’s not even satisfying to fix because it’s such a facepalm moment. :frowning:

In wp-config (and in Settings-General) the WordPress Address (URL) and the Site Address (URL) matched, but they contained a mix of upper and lower case letters (because that’s the way we refer to the site). In desperation I changed them both to all lower case, and lo and behold, everything is fine.

Thank you so much for your assistance - I am always very pleased with the support I’ve received from you.

Wishing you a happy new year!

Glad it’s working now and you’re most welcome! Happy new year :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.