01-13-2012, 10:52 AM
First of all, I do not know anything about PHP. I have a website where I need to edit the Header.PHP file. When I go in and make a change then save the change everything looks okay. When I bring up my webpage and do a "view source" I see the change I made, but the change keeps disappearing. I recently noticed that after I "publish" the website with new changes, then the change I made will disappear in the Header.PHP file when I check it.
For example, I have added the google meta tag to use for site verification, then go the google to verify my site and it is fine. Eventually, when I go back to google it wants me to verify the site again and the change I inserted in the Header.PHP file disappeared.
Today, I was trying to add the "canonical link element" tag into the header.php and it disappeared also.
Can anyone offer some help?
01-13-2012, 02:25 PM
Is this on a CMS system like WordPress, Joomla, or Drupal?
And are you making the changes via their admin section, or by hand (using FTP).
01-13-2012, 09:01 PM
I do not believe it is any of those- the first few lines of source code is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
I am making changes using the cpanel in hostgator using file manager, then editing Header.PHP- then it will save change successfully.
Thanks for any help
01-13-2012, 09:35 PM
After you make some changes, try viewing it online with and without the "www." in the URL.
See if that makes a difference. Let us know.
I'm guessing it's a caching issue. With or without the www. in the URL might answer that.
If you see a difference, you should try accessing and updating files using FileZilla (FTP).
FileZilla is free, so download it and install it. You can get your FTP account info via
your webhost control panel ... or create one using your control panel. File updates
and transfers are so much easier using FTP (and FileZilla).
01-14-2012, 07:20 AM
I tried both URLs- that does not make a difference. I placed the code in a again, saved the Header.PHP file successfully. The code shows up when you to go to the web page and look at the source on each page I checked, but I soon as a go in the editor and do a Publish- the changes get deleted from the Header.PHP file.
Originally, I had this site built by someone else. They set up a Web 2.0 template with most of the edits being able to be done in a special editor that was built. However, the changes I need to make are in the actual Header.PHP from the cpanel on hostgator.
I am not sure whether the builder's of the site coded something in the site that prevents me from making changes like I am making or not. It is weird that I can make and save the change ok until I publish. I always publish my changes via the editor that they provided not from within cpanel/hostgator.