• Resolved 5high

    (@5high)


    Hi,
    I’ve made some adjustments in a child theme of Twenty-Twelve (mainly css changes) and thought i should check it with your Theme-Check plugin…

    It popped up with 2 WARNINGS – but I’m not confident to just go ahead and delete them, as this is really outside of my comfort zone.

    The 1st Warning = error_log PHP error log found.
    As I couldn’t find an error_log.php file in my child theme I searched all my files via my cPanel and have found a few – just don’t know for sure which one to delete. The files are:

    /public_html/error_log
    /public_html/wp-admin/error_log
    /public_html/wp-content/themes/twentytwelve/error_log
    /public_html/wp-includes/error_log

    I assume it would be the one that sits in the Twentytwelve theme? Does anyone have any advice please?

    The 2nd Warning = .git Hidden Files or Folders found.
    I can find the .git folder, in the child theme directory, and it has these sub-folders in it:

    hooks: 4 KB httpd/unix-directory 0755
    info: 4 KB httpd/unix-directory 0755
    logs: 4 KB httpd/unix-directory 0755
    objects: 4 KB httpd/unix-directory 0755
    refs: 4 KB httpd/unix-directory 0755
    config: 313 bytes text/x-generic 0644
    description: 73 bytes text/x-generic 0644
    HEAD: 23 bytes text/x-generic 0644
    index: 2.19 KB text/x-generic 0644

    I’ve looked in all of these and they don’t appear to be important, but I’ve never had any dealings with .git files, and can only find limited info in the forums and online – something used for versions during development?

    My question is: Is it really OK to just go ahead and delete this folder??

    I’m sure these are very basic questions for theme developers, but I’d really appreciate some guidance, as I’m trying to improve my child theme to ‘harden’ my wp site for security.

    https://www.ads-software.com/plugins/theme-check/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    As theme-check is a development tool, it is advisable to run it in a “clean” environment on your local machine.

    Make a clean WordPress install locally. No special plugins, etc. Not a git checkout either.

    Then take the ZIP of your theme, as you intend for others to have it, and install it to that clean environment.

    Then install theme check and run it on that clean install. This will help to eliminate false errors caused by .git folders and such in your development environment.

    Thread Starter 5high

    (@5high)

    OK – I understand the usage of your plugin much better now – thanks!

    I’ll certainly use it for my next child theme, but I’m only developing this one for our own site.

    I notice in other threads that you tell people to remove the .git folder before uploading a theme – so should it not be there at all once it’s finished and up on the server? So I could/should delete it??

    Also that I’ve read that it’s the server that makes the error_log.php file on installation – so, likewise, should I delete it?? (the one in the main theme folder)? Or will that cause some problems?

    Many thanks for your feedback and advice.

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    What you should or should not do is not really the point. The plugin is designed to help find errors in themes before they’re uploaded here, to the theme directory.

    Whether or not you should have error logs or .git directories on your server is a question you need to answer for yourself and your particular situation.

    Those files should not be in a theme being distributed to others, and that’s why it’s giving warnings about them.

    Thread Starter 5high

    (@5high)

    OK, and thanks for taking the time to explain it – I’ll review on my local server as you suggested.

    Thread Starter 5high

    (@5high)

    If anyone else is looking at doing this, just to let you know that i did delete the .git files on the server, and all OK!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘which error_log.php to delete? – and can I delete the .git folder?’ is closed to new replies.