Chuyển đến nội dung chính

Missing or Deleted Header.php, Functions.php, Footer.php and other .php Theme Files

Recently I was working on one of my new websites and wanted to add Adsense Code in my sites header.php (so that it could be reviewed and approved for monetization). Suddenly, all my header.php scrip got deleted and my website was nothing more than a boring text page like.

php header deleted - Tech Urdu 
header.php

The header.php of my site got deleted completely. Though I solved my problem yet I wanted to share my methods with you so that you can get through such a problem without any worries.

Keep it in mind these methods work for Missing or Deleted Header.php, Functions.php, Footer.php, Comments.php and other .php files.

Scroll Down for detailed instruction Video

Missing or Deleted Header.php, Functions.php, Footer.php and other .php Theme Files

Working on a website, blog especially working with a WordPress site, you at times come across with .php files. Now if you don't know/understand coding (HTML, CSS, Java, etc), then it becomes really problematic to solve missing/deleted .php files problem.

Also Read: How to Trace Mobile Number Exact Location?

Here I have discussed three methods using these you can get over such a coding problem. Remember, Developers charge for such works on your website. So, why not learn these easy steps and do it yourself.

Changing the Theme Completely

Well, since your current theme .php files got deleted, it becomes really hard to get those right (if you don't know to code). Then there is a very simple method - just install and activate a new theme.

add new wordpress theme - Tech Urdu

Remember, once you install the new theme you need to make all setting from the beginning to match the layout of the new theme.

By Copying .php Code from another Similar Theme

Now this one is very interesting. If you use the same theme for two different websites, then copy the .php file of the one and paste it into the deleted files. This method is not a sure solution as in some cases very few coding is needed to match the new site.

php theme - Tech Urdu header.php of the theme

So if you know some basics of php then this method will work for you. The advantage of this method is that you will get your current theme back - no need to install any new themes.

By Installing a new Fresh 'Same' Theme

If you want to get your current favorite theme at all costs (and don't want to try a new theme and don't know the even basics of coding), then you this one is for you.

All you need to do activate any theme available and delete the theme you want to apply for your website. Once deleted, re-install the theme by any method. Activate it and bingo you got it back. Now just make some customizations and you are good to go.


Read Next: Top 10 Most Sold Phones of All Time.

Let me know in comments below which method works/worked for you. Add any other method you think is easy to do.

Nhận xét

Popular Posts

Coding and Kids

I did it.  I made the leap into robotics.  I was terrified to fail.  I kept putting it off-finding reasons that I couldn't make it work right now. But, the kids asked about when the robots were coming.  So, I jumped.  And I regret nothing. I do not know how program or code.  At all.  But, the good thing is that code.org and sphero and other coding groups know this.  They have your back.  They have created lesson walkthroughs for the teacher, or you can just show the tutorials to the students and have them follow along.  I relied on that and the fearlessness of my students.  We had a blast as learners together. Ok.  I am sure you know about the Hour of Code.  And I am sure some of you are on the bandwagon. But, I have an idea that some of you hear it and think--not one more thing.   I can't do one more thing. And I hear that.  I am a classroom teacher, but I promise once you try it, it will remind you why you beca...

iPhone factory reset bars access to revevlation

It has been known for sometime there is no general release that can handle the deleted encrypted data on iPhone 4s onwards.  The latest article in the The Register ( http://www.theregister.co.uk/2014/05/01/thanks_for_nothing_apple_say_forensic_security_chaps/ ) rehearses discussion the forensic community has already had about deleted keys and deleted encrypted data. The factory reset point merely