WordPress.org

Forums

WP Migrate DB
[resolved] Add date to filename, support compression, mention wp-config.php (5 posts)

  1. Daedalon
    Member
    Posted 3 years ago #

    Thanks Brad and all other contributors for the excellent plugin! I put it into use today and it worked near-perfectly. Glad I bookmarked this earlier when preparing for exactly this sort of a migration need.

    I came across three ways how the plugin can be made better. I believe they're all comparatively easy to implement.

    1. Add a datetime for the filename, WordPress style. Current filename is 'subdomain_domaintld-migrate.sql', and could be 'subdomain_domaintld-migrate-yyyy-mm-dd.sql' instead, eg. 'www_wordpresscom-migrate-2012-07-11.sql'.
    2. Add compression option for the archive. Preferably both gzip and bzip2. I would use bzip2 always to have the minimum file size, but gzip is faster to create and takes less memory and might be the best option on some hosts.
    3. Add a mention in the UI that the user needs to remember to do any required changes to the wp-config.php after the files and this database have been moved. This will save some people time wondering what's left to do.

    http://wordpress.org/extend/plugins/wp-migrate-db/

  2. Daedalon
    Member
    Posted 2 years ago #

    According to the release notes, everything else above is included in the new 0.4 version except #3. Good work, Brad, and thanks!

  3. ereckers
    Member
    Posted 2 years ago #

    Funny reading this because I just came to the forum to remove the datetime from the filename. (I'm tracking changes to .sql with GIT and actually want the file overwritten).

  4. Brad Touesnard
    Member
    Plugin Author

    Posted 2 years ago #

    Sounds like everyone has different preferences when it comes to the filename, which means we should really just add a filter:
    https://github.com/bradt/wp-migrate-db/issues/16

  5. Daedalon
    Member
    Posted 2 years ago #

    Agreed; the defaults should be the ones most convenient for the majority of users, especially new users, and then there should be an option to adjust them.

    Not sure if a filter is needed here. Having one never hurts, but using filters is beyond the skills of the majority of users and unnecessarily hard to maintain for the rest. The plugin settings screen should come with a field for specifying the filename format.

    The format could be so that any single alphabetic character prefixed with # or any string contained within {} gets interpreted through http://codex.wordpress.org/Function_Reference/date_i18n according to http://codex.wordpress.org/Formatting_Date_and_Time functions. Prefix would be chosen automatically. Examples:

    mysite_backup_{Y-m-d-Hi}
    mysite_backup_#Y-#m-#d-#H#i

    Both return something like
    mysite_backup_2013-05-23-1240.sql.tar.bz2

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Migrate DB
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.