I have a html-page with a Gallery. It works fine, but Claude (free version) tells me I should perhaps change to .php - @dan
Claude writes: Elements flags that component as needing a PHP page, and the page currently publishes as index.html. I couldn’t find a docs page that explains why Gallery needs PHP, so I’m relying on the app’s own warning.
When adding a Gallery component onto the page, Elements will prompt you to change the page’s file extension to .php per the above video.
While the page may be working fine for you with an .html extension, it’s best to go with the recommended .php extension for compatibility and to make sure all the Gallery features work as expected.
Don’t forget to delete the index.html file on your server.
Plus make new internal links to the index.php file? I did this, but it’s probably not necessary since it’s the same page in Elements. Only new file on the server. @differentdan
Yeah I’d try one page first. Just change that one page to .php and then republish. Afterwards test everything to make sure it’s working. If it’s looking good then maybe try a second page, and so on until you feel comfortable changing all pages.
You are hosted with us, so you have backups in case you need to revert anything.
Correct, each page folder should contain one index.html file. When you upload the new index.php file, then the old .html file is the one you would delete.
I do want to mention though, that I specifically set up Elements Hosting to account for these types of situations. On our hosting environment, the server will always “serve” index.php files first, even if there is an index.html file in the same folder.
That means that technically you don’t really need to delete the index.html, because the server is going to see the index.php file first and serve that one to your web visitors.
Deleting the index.html file is more of a house-keeping/tidying up step, so you don’t have multiple index files sitting in the same folder. It’s still a good idea to delete those unnecessary index.html files, but it’s not something that will break your site if you don’t do it immediately.
Hope that helps. Let me know if you have additional questions.
Upload the new index.php first, then go to the correct folder on the server. You should see both the index.html and index.php. Delete the index.html (already done in my burano sample).