WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Why lost data when I upload then download a php file of WordPress?

[Resolved] Why lost data when I upload then download a php file of WordPress?

  • Why when modifying some WordPress files, customizations and adding values ​​in PHP, and sent to the FTP server when it downloads the same file sent, if we add some values​​?

    These values ​​are saved in the database? how to redeem them back and change them? overwrite them?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Which files are you modifying – WordPress core files?

    A strange thing … I put a custom message instead of the message in English as before, the file is wp-contents\themes\my-theme\comments.php:

    <?php if ($comment->comment_approved == '0') : ?>
    <em>Your comment is awaiting moderation.</em> ?>

    Then… when the visitor left a comment, it appears my message thank you.

    <?php if ( $comment->comment_approved == '0' ) { ?>
    
    <center>Thank You! I will aprove your message later!!!</center>
    
    <?php } ?>

    Then I went up the file by FTP.

    Except that when I downloaded the file comments.php to my computer in order to change the message that I had put the message was not there in the file comments.php. And when I comment on the blog the message that I set … But how can I change this message again if the file that I downloaded does not have more?

    Can you link to your site (URL)? Which theme are you using?

    Hello! I found the file which the message! There are in wp-includes comments-template.php!!

    No problems now!

    But thanks! 🙂

    not a fine idea to modify core files.
    right way – use (or make) a plugin which will hook the functionality

    modding core files will make upgrading WP troublesome, and changes will be lost.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Why lost data when I upload then download a php file of WordPress?’ is closed to new replies.
Skip to toolbar