Website Crashing Can File Names be Changed from Index HTML to Index.PHP?

We spent days building content for websites, and whenever open dating. It tells me resources are missing and it will not navigate properly and starts to crash. It tells me resources are missing.

I did email real Mac support but have not had any response. Then tried to copy the pages into a new project file, which took me most of the day. The page types that were selected were PHP, but with Realise That It Tells Me that the page types are HTML. The file type extension in the settings was still on HTML, although the pages were created as stacks pages. Will the page needs to be recreated again, or can I simply change the extension of each page to index PHP?

The extension .html can be changed to .php. As a matter of fact, many of us routinely change the default extension to php (screenshot).

Otherwise, I can’t help you any further, because I can’t understand what you are trying to say.

I have changed the default now, but the problem is although the pages were created as stacks PHP pages they had HTML names as this was not changed setting was not changed. Assuming they are actually PHP because they were created as a stacks page will they now export as PHP now I have changed the extension to index.php on each page?

Is there any reason you need to have them PHP?

RapidWeaver should automatically change the extension to PHP if the page requires PHP.

Not all stacks pages need to be PHP. If any stack requires PHP it should have changed the extension for you. There’s an option in advanced settings that will allow you to set the default extension for all new pages you create.

You can change the extension manually on each page.

If you have published you’ll need to delete the old files manually.

RapidWeaver doesn’t delete any files, so if you published with index.html and have changed the extensions to index.php then you’ll need to delete the unused files from the server with an FTP app or file manager.

1 Like

Thanks, this is helpful. The reason why they need to be PHP is because the addins that I am going to use require PHP.

If you use a stack that requires PHP on the page, Rapidweaver will change the extension for you. That’s assuming that the stack developer coded the stack correctly.

Now if you are putting custom code (PHP code) on the page then you need to set the extension yourself.

The reason for changing the default from .html to .php is that it doesn‘t make any difference to a page which isn‘t using .php, but if you add a stack which does use it, it will change a .html page to .php and you’ll have both .php and .html versions of the same page! A few experiences of wasting hours trying to work out why the server isn’t dishing up your changed page, and setting the default to .php seems a no-brainer!

1 Like

Running pure HTML pages as PHP will often create performance hit, especially in a shared hosting environment like most RW sites run under. Although running an HTML file under PHP works, it’s often not the best practice.

Depending on the web server used and how it’s configured, the performance hit can be slight or somewhat significant. At a minimum, the PHP module will need to read and interpret every line of the HTML looking for PHP.

They set most shared hosts up to look for an index.html file first, when the client access a directory. After a physical I/O doesn’t find the index.html, it then will look for an index.php file. Although that might seem trivial, it can take up some precious time and resources in an overcrowded shared hosting environment.

If you are going to set every page to be PHP, and then at minimum you should change the DirectoryIndex directive in Apache (htaccess will work) not to look for the index.html file first or at all.

DirectoryIndex index.php index.html
The above will look for the index.php file first, then the index.html if the PHP file isn’t found.

For sometime now, RapidWeaver gives you a warning message when you publish and it finds multiple index files (html, php).


So when you get this warning it really shouldn’t take you hours trying to figure this out.


Technically, you are correct. In fact, if we wanted a ‘shock, horror’ headline for the .php page performance hit, we could say that it doubled the latency time at the server end. But since this is from about one millisecond to two, I doubt we could ever find a user who was capable of noticing the difference (indeed, I very much doubt I’m capable of perceiving time intervals of less than a quarter of a second — 250 times this).

And I had noticed that RW flagged duplicate index pages. But if you have named pages that are not in individual folders, it doesn’t. And adding even a simple stack, like a cut-down contact form, can cause you to end up with duplicates. Having been caught by this a number of times in the past, I find it just easier to change the default for all pages to .php. And since the majority of the pages on my sites actually use .php — and it’s only the lightest pages that don‘t — this makes sense anyway.

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