Have you ever thought, what would happen if all of a sudden the header section of your WordPress website just gets disappeared, what will you do? The same thing happened to one of my clients a few days back.
He just woke up in the morning then head over to his laptop to check his website and he was shocked! As the header section of his website was completely missing, he was not able to figure out the reason for this header disappearance.
You can see the exact problem of the disappeared header section in the below screenshot.
When he encounters this problem his mind stops working, and he immediately reached out to me with the hope of fixing this error as soon as possible.
It was obvious to get panic as his entire business depends on this website, thus, he was so desperate to fix this issue. So I had to investigate the matter to understand the root cause of this issue in order to fix it for him.
Therefore, I started looking for the reason behind the issue, and luckily I was able to discover the root cause of the problem and its solution as well which fixed my clients’ website and his business reputation.
If you are also facing the same issue or just curious to know how to fix and restore the disappeared website header on WordPress, then go through this post as I am going to share with you everything I did step by step in this tutorial.
By the way, this is not a universal solution for this very problem as there could be multiple different reasons for header disappearance, and in this article you will learn how to restore the header if it got disappeared due to the missing ‘header.php‘ file from the backend theme folder.
However, if the root cause of your problem is not the same, as I mentioned above, then I would recommend you hire someone who can find and fix the issue for you.
I am not going to waste your time explaining what I did to find the issue; instead, I will jump straight to the solution in this tutorial.
The very first thing I did was I checked that if a “header.php” file existed on the server or not.
In order to check this you just need to go to the ‘Appearance‘ menu in the WordPress admin menubar of the WordPress dashboard, then you will find a sub-menu option called ‘Editor‘ to the extreme below as you can see in the below screenshot, now just click on that sub-menu.
Once you click on the editor menu item, a new window will open up where you can see all the backend theme files and a code editor to edit those files.
I strictly recommend you not to touch any of those files or the editor window as a single mistake can break your entire site immediately. So just follow what I am suggesting to you for a safe solution.
Use the keyboard of your computer and press the buttons “Ctrl+F” on Windows and “Command+F” on Mac at the same time, then a pop-up search window will appear, after that head over to the search bar and type ‘header‘ and press the enter button.
As soon as you follow this process you should see a file named “header.php” under the ‘Theme Files‘, however if you could not find that particular file under the suggested section as like the screenshot below then it simply means that the ‘header.php‘ file is missing from the theme files for some reason.
Just to make things more clear for you, I want you to search for the footer file using the same method, and you will find a “footer.php” file appeared as a search result as you can see in the below screenshot.
In the same way, a ‘header.php‘ file should also be there just like the ‘footer.php‘, so I hope now you got my point. If yes, then don’t touch anything else on that screen and just close it down for now.
In order to get the original ‘header.php‘ file you would require the ‘zip file‘ of the very theme that you are currently using for your WordPress website.
If you are using a free theme, then just head over to the official theme page or WordPress directory and download the theme to your computer locally; but if it’s a premium theme then download it from your customer account on the official theme website.
As soon as you download the theme to your computer, now extract or unzip the zip file, once you unzip the theme files, you need to find the ‘header.php‘ file inside one of the unzipped theme folders.
So now that you have managed to arrange the ‘header.php‘ file from the same original theme files, it’s time to upload it to the backend server in order to fix the issue.
There are multiple ways to upload a file on the website server including:
Now it’s totally up to you which method you want to use to accomplish this task, whatever method you follow the process would be almost similar to completing this task.
In this
However, one thing to keep in mind that it’s very risky as if something goes wrong then eventually you would require access to the cPanel or FTP account to fix the occurred issues or your website would remain broken.
Once you log in to your server using any of the following methods you like, the steps to upload the file to the server should be as follows:
I have added a screenshot of the window where you can see the uploaded ‘header.php‘ file under the necessary ‘themes‘ folder which is under the ‘wp-content‘ folder.
So now the ‘header.php‘ file has been uploaded to the server, and it’s time to go back to the WordPress editor once again following the same process shown in step one to check if it is appearing over there or not.
I did the same this time and I found the ‘header.php‘ file is now available under the ‘Theme Files‘ this time unlike before which you can see in the below screenshot as well.
Now that the suggested file has been successfully uploaded to the server, and it’s also showing in the WordPress theme editor window.
Just head over and open an incognito/private window in your web browser, then enter your website URL. Boom! You have successfully restored the missing header section on your WordPress website as I did with my client’s website which you can find in the below screenshot.
Once I implemented all the above-mentioned steps to resolve the problem and restore the missing header, the website got back to its normal state as if nothing had happened to it in the first place.
If you have ever run into such issues with your theme, but the support team didn’t help you resolve the issue then you should consider replacing your old theme with one of the best WordPress themes.
In this way
I’ve shared everything I did to fix this problem just to help and teach the people like you who are also facing the same problem as my client did.
However, if in your case the footer section of your WordPress site got disappeared and the reason behind this is missing of Footer PHP file then you can follow the same steps as shared in this article to resolve the issue but this time the file would be ‘footer.php‘ instead of the ‘header.php‘
So if you found this tutorial helpful, then please don’t forget to share it with your colleagues and community in order to help them as well. Also, feel free to share your feedback or concerns in the comment section if you have any.