If you have messed with any of your theme’s .php file and are now unable to log into your WordPress dashboard neither your website is opening anymore then we have to either outsource or look for alternatives like connecting with our web host using FTP client etc. Selecting the right FTP client and configuring it as per our web host’s instructions can be a cumbersome task.
I still remember around an year ago I messed with my function.php file even though I was always told not to do that. I was trying to make some changes to my website redirection and footer credit but just because of merely some extra spacing in the code, the website stopped opening. I was not even able to log into my WordPress admin panel, it was really a tough time for me and after reading so many stories online about how some of the web host do not even provide FTP access and few were charging huge extra money to roll back the changes. I was really worried about how would I go ahead and resolve this.
The reason why I recommend taking extra precautions while making changes specially to your functions.php file is because not every solution which you find through Google applies to your theme. Function.php is a theme based file and belongs only to that theme in whose directly it is located. The elements of a particular function.php file are only relevant to its own parent theme and may not work if applied to another theme.
I was a beginner at that time and even though people were appreciating my content but I had no clue about how to make changes to the WordPress code or about the technicalities of setting an FTP client and using it.
Luckily my hosting provider was bigrock.com and I started to explore the features provided by them in the admin control panel. I was amazed to see that big rock has an inbuilt file manager feature which I can use to make changes to the code of any of the file of my theme.
So if in case you have messed with any of your theme’s .php file accidentally, please do check within your hosting control panel for the same. I know this is a very common problem as we all keep making changes to our theme files to improve its look and feel and other functionality as and when required.
If you are using bigrock.com as your hosting provider then you can follow below steps to access any of the theme file and make changes using the inbuilt code editor.
1. Login to your Account
2. Click on the Primary Domain associated with your Hosting to go to Your Hosting Control Panel
3. Click on Manage Web hosting to go to your cPanel
4. Click on File Manager
5. On the left hand scroll to the activated theme (public_html -> wp-content -> themes -> your theme) you are using and click on it, in the right hand pane it will show you the associated files
6. Highlight function.php on the right pane and click on Edit or Code Editor at the Top and then click Edit on the Pop Up
7. It will open the Editor for you , make the changes you want and click save changes on top right corner.
I have been using Bigrock.com for my Hosting and Domain needs since long and had never had any issue till date. If you are looking for a Hosting Provider specially in India, then I will surely recommend checking them out.