After following the upgrade instructions to a T (as I did when upgraded to 1.6.2) I am no longer able to edit my index.php file. When I’m in the control panel and click on the index page, I see my source code and can actually edit and save it as I please, but when I click on “view renedered template” I see a file that is as if I had never edited. None of my changes show up.
When I bring it down using an FTP program, I see that the changes I made have not be saved or are being saved at perhaps another location?
los1sol, you ordinarily don’t edit your index.php. You instead edit via the control panel a template that is displayed on your home page.
If you look at your EE back end after clicking on the Templates tab, you should see a list of template groups. One of these groups will have an asterisk next to it. That’s your default template group. Is this the template you are talking about?
I assume I’m saving them as a text file. I just hit “Update” and hope for the best. But yea, it’s just code so I think it’s saving as text. But the path looks a little weird now.
The path must be off. Another clue is that the hit counter remains unchanged despite my going directly to http://www.pawsonpalmer.com/index.php
And when I pull down the index.php file via an external FTP program, i can see that the changes I had supposedly made and saved are not there.
Clearly these aren’t being saved correctly but how do I fix this?
And when I pull down the index.php file via an external FTP program, i can see that the changes I had supposedly made and saved are not there.
Clearly these aren’t being saved correctly but how do I fix this?
I think there might be some misunderstanding as to the working of EE. As Sue pointed out, the index.php file is never edited directly: rather, it is the core file that EE uses to pull the relevant content from the database. The changes you make to your templates are only visible in the database, but not in any physical files on your server (unless you save your templates also as files, but that is completely optional.)
Okay, so I took it another step further and updated the index.php file I downloaded via FTP and sure enough, I see the changes I just made. The problem is I want to be able to update the index file within the Expression Engine template control panel.
It looks like you can’t have it both ways; update it in the control panel and update it by manually uploading an updated file. Is this accurate?
And if so, how do I get it back to where I can update it via the control panel?
My site is pretty undeveloped so if I have to delete my index file and simply create a new one I would. In fact, I tried creating a new template to test this method but I wasn’t able to save anything to that newly-created template either so I think the problem is bigger than that.
And when I pull down the index.php file via an external FTP program, i can see that the changes I had supposedly made and saved are not there.
Clearly these aren’t being saved correctly but how do I fix this?
I think there might be some misunderstanding as to the working of EE. As Sue pointed out, the index.php file is never edited directly: rather, it is the core file that EE uses to pull the relevant content from the database. The changes you make to your templates are only visible in the database, but not in any physical files on your server (unless you save your templates also as files, but that is completely optional.)
Thanks for the tip. I guess I must have replaced the index file with my local copy of the template that I had named index.php at some point, but I don’t remember doing that. And the first time this problem occurred was during the upgrade to 1.6.3 so I find it a strange coincidence.
But regardless of how it happened, how do I go about fixing it now? That’s all i care about.
Well, that is the central EE file. You don’t want to modify that. If you bring it up in your browser, you are actually calling
http://www.pawsonpalmer.com/index.php?/site/index
“site” is your default template group, and “index” is the default template, and they are all “routed” through index.php, so to speak. The docs explain that very nicely.
Thanks for the tip. I guess I must have replaced the index file with my local copy of the template that I had named index.php at some point, but I don’t remember doing that. And the first time this problem occurred was during the upgrade to 1.6.3 so I find it a strange coincidence.
Not so strange, you might have easily overwritten index.php at some point.
But regardless of how it happened, how do I go about fixing it now? That’s all i care about.
Re-upload the EE files, but be sure to keep config.php and path.php. All content should be in the database, so you can safely overwrite index.php and similar files.
Once you have done that, log on to your control panel. There you have a tab “Templates”. The “index” one in the “site” template group is your “homepage”, so to speak. Making sense? Oh, and do give those ressources I mentioned a try. You’ll find them very helpful.