Search code examples
phpwordpressfileauto-updateblank-line

WordPress Adds Unwanted Blank Lines to Files


When I open my WordPress files (config.php or PHP theme files), suddenly I have multiple blank lines added inside my code.

Example before: enter image description here

Example after: enter image description here

I don't know why this happened.

It is because of Wordpress automatic updates?

Any idea how to fix it?


Solution

  • Ok, I found the problem! Effectively, it's related to Dreamweaver editor...

    I changed the option inside Preferences->Code format->Line Break Type :

    CR LF (Windows) to LF (Unix)

    Now my files open correctly if it was edited previously in PHP Storm and re-open with Dreamweaver after.

    Thank you for your hypotheses, that help me find the problem!