Html vs php ... problem with my website... help!

Hi all,

I’m in the middle of a MAJOR overhaul of my site and I have been creating new pages and/or duplicating some older pages to keep the formatting and content.

I just realized that I have some pages that are .php and others that are .html (I imagine it is related to what theme I used when I first created the page?)

I’m now getting errors when uploading that there are sometimes two pages with the same name, but one is php and the other is html. Also causes navigation problems on my published website.

Help? Should I change the file type to one or the other? My entire new site is going to be built with Stacks 3 and the new Joe Workman Foundation framework.

Thanks,
Matt

If you are using the SEO Helper stack on any of the Foundation pages, it will change the name from .html to .php. You will want to keep the .php one and since RapidWeaver does not remove the unwanted file, you will need to go and remove it yourself. If you are having linking issues, use a redirect (do a search of the forums, lots of help with these on here already) to help.

Use a FTP Tool and delete your website.
Then republish all files with RapidWeaver.
RW does not delete old files, only update the files.
There cannot be php and html, only one, depending the plugin/page, otherwise you have problems.

1 Like

Got it, thanks guys. Manually deleting the duplicate (html) files fixed the navigation problem.

QUESTION: Should I change the suffix on my pages to php in the inspector? (and once again delete the html versions online).

I’m not much of a www tech… more the drag-n-drop guy… so I don’t really know what the heck php even is. Sounds like an illegal drug, or maybe an ingredient in dandruff shampoo. heh.

It is best if you RapidWeaver lets make this work, automatically.
But if two index files are on the server, you have to delete one of them, but the right one :wink:

1 Like

Hi @mabou2

You CAN set the default extension in RapidWeaver to PHP and all new pages will have that extension, any old pages you will have to do as you thought, change the page type to php and delete the .html from the server.

The only issue with this is that if the page doesn’t actually use php code, then your server works harder for nothing and may slow down your page load time a touch.

The benefit is you don’t have to worry about having to figure out what extension to use where (peace of mind)

HTH
Brad

I have pretty limited knowledge but the gist of it is that php allows you to insert, for example, stacks that have advanced functionality by working a bit of magic on the server itself when it is published.

1 Like

This is not entirely true. If there is no PHP code to be found on the page, it does nothing as far as load time. Even with PHP code on the page, the difference between a page with HTML and a page with PHP is milliseconds. If you can tell that difference I want you to teach me some tricks!! :wink:

1 Like

Agreed to an extent. Any page with the extension php gets processed at the server prior to delivery with or without php code. But yes, the time is milliseconds depending on amount of PHP being processed on the page. To be truthful, no time different between php pages and shtml pages imho. Both are processed at the server prior to delivery.

Brad

SO… what I still don’t get is… should/Can I just change the suffix on all of my legacy pages (that now have php content) to .php or should I trust that Rapidweaver/stacks will do that automatically where necessary?

I think you are safe to let RW do it. There were some older stacks that need .php and you had to do it manually in RW but you will notice if this is the case you will get a problem on that page. Maybe even an error that tells you to change the extension to php.

I think a lot of newer stacks that need php do it automatically as I haven’t run across this in a while.

The confusion comes because RW won’t delete the old file. If you change a page but your change doesn’t appear, first thing to check is if you have both .htm and .php

When a page, stacks or plugin, needs php, RapidWeaver make this automatically.