Giter Site home page Giter Site logo

wp-sync-db-media-files's Introduction

WP Sync DB

WP Sync DB eliminates the manual work of migrating a WP database. Copy your db from one WP install to another with a single-click in your dashboard. Especially handy for syncing a local development database with a live site.

Looking for a Maintainer

I've moved away from PHP & WordPress work and don't have time to maintain this. If you're a talented PHP developer I'd be happy to give you this repo. Grab the latest code from delicious-brains, remove the license checking, branding, & other cruft, and open up a PR to show me your work.

Description

WP Sync DB exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, then allows you to save it to your computer, or send it directly to another WordPress instance. It is perfect for developers who develop locally and need to move their WordPress site to a staging or production server.

Selective Sync

WP Sync DB lets you choose which DB tables are migrated. Have a huge analytics table you'd rather not send? Simply deselect it and it won't be synced.

Bi-directional Sync

Pull: Replace a Local DB with a Remote DB

If you have a test site setup locally but you need the latest data from the production server, just install WP Sync DB on both sites and you can pull the live database down, replacing your local database in just a few clicks.

Push: Replace a Remote DB with a Local DB

If you're developing a new feature for a site that's already live, you likely need to tweak your settings locally before deploying. Once you've perfected your configuration on your development machine, it's easy to send the settings to your production server. Just push to the server, replacing your remote database with your local one.

Database Export & Backup

Not only can WP Sync DB pull and push your DB: it can export your DB to an SQL file that you can save and backup wherever you want. No need to ssh into your machine or open up phpMyAdmin.

Encrypted Transfers

All data is sent over SSL to prevent your database from being read during the transfer. WP Sync DB also uses HMAC encryption to sign and verify every request. This ensures that all requests are coming from an authorized server and haven't been tampered with en route.

Automatic Find & Replace

When migrating a WordPress site, URLs in the content, widgets, menus, etc need to be updated to the new site's URL. Doing this manually is annoying, time consuming, and very error-prone. WP Sync DB does all of this for you.

Stress Tested on Massive Sites

Huge database? No prob. WP Sync DB has been tested with tables several GBs in size.

Detect Limitations Automatically

WP Sync DB checks both the remote and local servers to determine limitations and optimize for performance. For example, we detect the MySQL max_allowed_packet_size and adjust how much SQL we execute at a time.

Sync Media Libraries Between Installations

Using the optional WP Sync DB Media Files addon, you can have media files synced between installs too.

Installation

  1. Install github-updater by downloading the latest zip here. We rely on this plugin for updating WP Sync DB directly from this git repo.
  2. Install WP Sync DB by downloading the latest zip here. Both github-updater and WP Sync DB will now download their own updates automatically, so you will never need to go through that tedious zip downloading again.
  3. Access the WP Sync DB menu option under Tools.
  4. Install the optional WP Sync DB Media Files addon.

Help Videos

Feature Walkthrough

https://www.youtube.com/watch?v=u7jFkwwfeJc

A brief walkthrough of the WP Sync DB plugin showing all of the different options and explaining them.

Pulling Live Data Into Your Local Development Environment

http://www.youtube.com/watch?v=IFdHIpf6jjc

This screencast demonstrates how you can pull data from a remote, live WordPress install and update the data in your local development environment.

Pushing Local Development Data to a Staging Environment

http://www.youtube.com/watch?v=FjTzNqAlQE0

This screencast demonstrates how you can push a local WordPress database you've been using for development to a staging environment.

Media Files Addon Demo

http://www.youtube.com/watch?v=0aR8-jC2XXM

A short demo of how the Media Files addon allows you to sync up your WordPress Media Libraries.

Similar Tools

Isn't this the same as WP Migrate DB Pro?

No, of course not, don't be silly. I took out the license verification code, a really shady looking PressTrends reporter, and the tab for installing the Media Files addon before I published 1.4. Release 1.3 was the same as WP Migrate DB Pro, but I've made several improvements since then.

Is this Illegal?

No. Just because this is based on the paid-for WP Migrate DB Pro, it doesn't mean I can't release it. WP Migrate DB Pro is released under GPLv2, a copyleft license that guarantees my freedom (and the freedom of all users) to copy, distribute, and/or modify this software.

I was forced to rename it from "WP Migrate DB" to "WP Sync DB" after Delicious Brains decided to trademark the name "WP Migrate DB", filed a DMCA takedown against the repo, and threatened to take me to court. But they should be OK with it now.

wp-sync-db-media-files's People

Contributors

etcook avatar notslang avatar sergeykuzmich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wp-sync-db-media-files's Issues

Skip resized images

First of all, Thank you for this awesome plugin.

Can you please tell me how can I skip file migration of resized images.
I want to download only the main images not (image-100X100.jpg)

Please let me know how can i do it, i can edit files easily and know php also.

Thank you. :)

Files with accented characters are not synced

Hi there,
I have some files with accented characters in my upload folder, and wp-sync-db-media-files did not synced them.
I suppose I can ask wordpress to rename files, but it would be more "out of the box" if wp-sync-db-media-files managed it well.
Thanks

How to change directory of upload folder?

the database exchange was seamless. In one particular case, my default media files are not located in the uploads folder. I believe this is the reason why had trouble syncing the developments.

My theme also had some problems. Although I'm not sure where this may have occurred.

Migration completed with some errors

WP Sync DB does not seem to be installed or active on the remote site. (#131 - scope: process_push_request)

I am getting the above error when trying to push media from local to remote.

I have added and activated both wp-sync-db and wp-sync-db-media-files in my remote production environment but still it gives this error.

Whats the issue? Any solutions?

Media transfer option not showing up

Hello,
thanks for the great plugins!
I've installed github updater, wp sync db, and wp sync db media files but I'm not getting the option to sync media files. Its as if wp sync db media files isn't installed. Is there something I might be missing?

Thanks

Few images not pulling from server to local machine

Hello,

Thank you for creating this wonderful plugin!

Is there a reason why all of my images are not transferring? I am pulling from a development server to my local machine. The development server has 391 items, while my local machine only has 387 items.

I have tried the pull a few times, regenerated thumbnails, modified permissions, etc.

If anyone can think of something else I can try, it would be greatly appreciated!

Thanks,
Jeff

Media Img

Everything worked flawlessly except for the actual images showing up on my local development. The correct number is displayed, along with date author etc. however, the actual image is not displayed.

A problem occured when attempting to move the temp file

Hi I got this error when trying to push Local media to Live staging site

A problem occurred when attempting to move the temp file "/tmp/phpN1sgMa" to "/dir/to/my/website/wp-content/uploads/2016/05/my-image.jpg" (#107mf)
A problem occurred when attempting to move the temp file "/tmp/phpU3SsNb" to "/dir/to/my/website/wp-content/uploads/2016/05/my-image-150x150.jpg" (#107mf)

I think it got to do with the permission in my server. When I start using this server, I can't upload anything from WP. Then I changed the wp-content's permission to 775 via FileZilla and I can upload media just fine since then.

Image Option doesnt appear in option screen

Image Option doesnt appear in option screen with the last version of wp sync db.
Can you check ?

I notice that on the last version of wp sync db the name of all files inside class folder are incorrect it should be wpsdb and not wpmdb.

Sync up issue on WordPress 4.9.4

Do not sync through this exception on the console.

script.js?ver=1.5:1002 Uncaught TypeError: Cannot read property 'length' of null
at migrate_table_recursive (script.js?ver=1.5:1002)
at execute_next_step (script.js?ver=1.5:2307)
at Object.success (script.js?ver=1.5:1187)
at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-slider,underscore,shortcode,moxiejs,p&load[]=lupload&ver=4.9.4:2)
at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-slider,underscore,shortcode,moxiejs,p&load[]=lupload&ver=4.9.4:2)
at y (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-slider,underscore,shortcode,moxiejs,p&load[]=lupload&ver=4.9.4:4)
at XMLHttpRequest.c (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-slider,underscore,shortcode,moxiejs,p&load[]=lupload&ver=4.9.4:4)

Installing with composer

This plugin and the base plugin are abandoned, but you can still install the last release with composer by adding the following to repositories in composer.json (for e.g. Bedrock):

{
  "type": "package",
  "package": {
    "name": "wp-sync-db/wp-sync-db-media-files",
    "version": "1.1.5",
    "type": "wordpress-plugin",
    "dist": {
      "type": "zip",
      "url": "https://github.com/wp-sync-db/wp-sync-db-media-files/archive/cebf64eb528532d627284353278b284bb12e7ef1.zip"
    },
    "require": {
      "composer/installers": "^1.8"
    }
  }
}

Then just require as normal:

composer require wp-sync-db/wp-sync-db-media-files

Media Files sync is not shown in Migrate DB

Hello,
I installed the WP Sync DB first and the Media Extension after it, when I go to Tools -> Migrate DB - I can not see the option to include media files ... does anyone has an idea?

also include theme files?

Hi there,
Would it be possible and not too difficult to also include theme files and may be even the plugin folder for syncing?

Copying from server to local machine

Hey there.

Running Windows - Server is running Linux.

Upon starting the media transfer process, right after it says trying to determine which files to move, I get this error.

Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize() [<a href='splfileinfo.getsize'>splfileinfo.getsize</a>]: stat failed for C:\Ampps\www\calton\live/wp-content/uploads\2014\02\JPEG-Image-612-�+�-�576-pixels-100x100.jpg' in C:\Ampps\www\calton\live\wp-content\plugins\wp-sync-db-media-files-master\class\wpsdb-media-files.php:151 Stack trace: #0 C:\Ampps\www\calton\live\wp-content\plugins\wp-sync-db-media-files-master\class\wpsdb-media-files.php(151): SplFileInfo->getSize() #1 C:\Ampps\www\calton\live\wp-content\plugins\wp-sync-db-media-files-master\class\wpsdb-media-files.php(317): WPSDB_Media_Files->get_local_media() #2 [internal function]: WPSDB_Media_Files->ajax_determine_media_to_migrate('') #3 C:\Ampps\www\calton\live\wp-includes\plugin.php(470): call_user_func_array(Array, Array) #4 C:\Ampps\www\calton\live\wp-admin\admin-ajax.php(82): do_action('wp_ajax_wpsdbmf...') #5 {main} thrown in C:\Ampps\www\calton\live\wp-content\plugins\wp-sync-db-media-files-master\class\wpsdb-media-files.php on line 151

Release 1.1.4b1 is broken, new release required

I was using the zip of release 1.1.4b1 and was struggling to get this to work and dug into the code and found the issue in asset/js/script.js with this in my console.
Uncaught ReferenceError: wpsdb_parse_json is not defined

However after reviewing the updates to this file in the master branch you have already fixed this issue which I can confirm from testing.

Could I please ask that you make a new release so no-one else falls foul of this.

Many thanks.

update to 1.2

The code for 1.2 is in this commit 00fda90, so we need to copy over those changes into the master branch, renaming properly and eliminating code that we don't need.

Media files not transferring

Hi,

First, thanks for the support!

I'm having trouble transferring media files using the addon.

I've installed and activated WP Sync DB and WP Sync DB Media Files on local and remote. I do not see an add-ons tab (as shown in the video) in either instance, but I'm thinking that's attributed to the diffs between Migrate DB Pro. I've successfully been able to pull the _posts and _postmeta (only pages and attachments types) from the remote to local). However, I have Media Files checkbox checked and yet I get no media files. The transfer process says 0/0. What am I doing wrong?

Thanks!

Jeff

"Media Files" check not showing up

I've installed this extension along with wp-sync-db in three different WP instances. None of them show the "Media Files" checkbox. I suspect I'm not installing this the right way, but installation is not documented. Isn't it enouhg to download and unzip into wp-content/plugins?

Security contact

Hello maintainer(s),

I am a security researcher from the Institute of Application Security at TU Braunschweig, Germany. We discovered a (potential) security vulnerability in your project.

We would like to report this vulnerability to you in a responsible and ethical manner.
Therefore, we do not want to disclose any details of the vulnerability publicly until you have had a chance to review and fix it.

Could you please let us know your prefered way of receiving security reports?

You can contact us at [email protected] or by replying to this issue.

Thank you for your attention and cooperation.

Version doesn't match

The version number in version.php doesn't match the one downloaded. version.php says 1.1.4b1 when the downloaded version is 1.1.5.

Webp images migration

Hi! This is more a proposal than an issue.
Would it be possible to add the migration of generated webp images?
I often use Optimus to generate the webp version of my files, so my uploads folder contains both image.jpg and image.jpg.webp.
Clearly there's no reference in the db for the converted files and I always have to upload/download them via FTP.
A basic solution would be migrating all the files in the directory, a nicer one would be adding some configuration fields in which choose which additional files include in the migration. The latter could be applied to other kind of files/folders as well.
What do you think? If you need some help just let me know!

Not copying all files from

When i am pulling files from my dev server, its copying few sites folder from upload folder not all sites folder.
I have near by 5 sites on dev server but when i am migrating, it is copying only 2 sites folders.
Can you please help me to fix it?

Doesn't migrate on newest version of Wordpress

Has anyone tried this on the latest version of wordpress? When I try to sync media files, it doesn't pull them, it only pulls the database from live site. It is properly enabled, I think this plugin just may not be compatible with the latest version

Media Option not showing in Advanced Options

Hello,

First of all thanks for sharing.
After I activated WP Sync DB and WP Sync DB Media Files the option of the alst one are not showing up in the Advanced Options section of the WP Sync.

I must do something wrong.

Can you please help me.

Best regards,

Martijn

What is error #101mf?

Hey there,

great plugin many thanks. What is the error #101mf and how can I rectify it?

Thanks,

Feature Suggestion

Hi,

First of all thank you very much for this plugin. It is very useful.

I've found one use-case where would be useful to have checkbox Force overwrite all media files. For example if i've used Kraken.io before and file size is lesser than before. But plugin doesn't recognize any changes and new-lesser file doesn't copy again.

Hanging on determining media to migrate

Hi,

I have an issue where the media sync is hanging when determining which files to transfer, nothing particularly special about the install, WP 4.0, WP Sync DB 1.5 and WP Sync DB Media Files 1.1.4b1,

Only option is to cancel out of the sync when it hangs,

media-pull

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.