Hello!
Didn’t you see a folder called public_html anywhere? Also, try again and make sure you are using Filezilla right – https://codex.wordpress.org/Using_FileZilla. It’s usually Port 21, not 22.
Hi @blade yes I followed those instructions (although mine is slightly different as it’s using SFTP not FTP) – and no I don’t even have a folder called public_html which I’ve seen referenced everywhere I’ve looked for an answer.
For the username I’ve used Root but I’m wondering if this could be the problem? I can’t think of anywhere else I would have created a username though and I didn’t create a sudo one
Have you tried checking from your cPanel from the File Manager? And you could also contact your hosting company; maybe they’ll be kind enough to check things out and shed some light.
Also, I think it would be a good idea if you’d paste here that script you added in functions.php for others to see, and maybe someone could come up with a solution.
Hi @broseph I have finally managed to display all the files, I tried so many things so can’t say for sure what did it but I THINK it was just enabling all directory filters which were all turned off by default – thousands of files started to then appear (with question marks in them) and they all expanded as I clicked on them so that’s good news!
However, I’m still yet to find and remove the bad code I put in – as requested, the script I used was this
function wpbx_excerpt_length($length) {
return 300;
}
add_filter(‘excerpt_length’, ‘wpbx_excerpt_length’);
Which was supposed to allow HTML in excerpts pulled into the front page. I’m still looking for it but I’ve now found the folder that it must be in (WWW) and have been opening different files and doing cntrl+F to find the piece of code. I still cant find public_html though.
Any thoughts on how to either just do somewhat of a refresh to get back up and running?
Thanks for your help on this
Ok just FYI @broseph I am back up and running – I had to delete the entire theme and then reinstall it and it worked. However, just for the future, it would be great to know where the heck the functions.php file is in Filezilla – although maybe that’s for a different post
A bit of good news then.
If you added the code in the functions.php file, then it should only be there, therefore you should only look for the functions.php file, which should be found in /public_html/wp-content/themes/your-name/.
Glad to hear that!
Doesn’t matter from what software you’re accessing your FTP, the files are in the same place.
For the future, if you want to edit something, either backup the whole site or just backup the file you are editing by downloading it to your computer. Avoid editing from the Editor found in Appearance.