Download the PHP package logsmith/log-flume without Composer

On this page you can find all versions of the php package logsmith/log-flume. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package log-flume

log-flume-logo

This allows developers to sync WordPress media libraries between machines over Amazon S3.

It can also be used for backing up websites or even moving websites between servers

How Log Flume talks to S3

The setup will ask you to add these constants to your wp-config.php file:

You can obtain these details by creating an IAM user. Here is our guide on how to setup an IAM Amazon user and get the access and secret key that you need.

Installation

1. Add the Wordpress plugin to your composer file by navigating to your project and running this inside a terminal:

2. Activate the plugin via the admin interface, or just run:

3. Add your credentials to your wp-config file.

And these constants to your wp-config file:

4. Then finally run (you will need the constants above):

5. If the check is successful, you can start the log flume setup:

bucket_name is usually the address of the site you are currently working on ('website.local')

You will also be asked Create bucket? [y/n] - supply 'y' if this is a fresh setup. Select N to not do that.

6. Time to sync!

Bucket name is usually the address of the site you are currently using

Using log-flume to backup a live website

Log-flume can be used to backup a live site as well as sync development assets.

1. Install and setup log-flume

Get log-flume running on local version of the site (using the 'Installation' guide above).

2. Log into the live env

SSH into the live environment and navigate to your WordPress installation.

3. Check local credential work in live env

Run to find any issues.

4. Setup a bucket for the live env

It's always good to separate the dev and live environments.

Create a fresh bucket with the live URL as the bucket name. For example:

5. Setup auto-deletion of SQL files

Depending on how often you run this command, the SQL files will start to build up quickly. You can setup an S3 folder lifecycle to auto-delete files older than X number of days.

We usually usually retain backups for 30 days:

6. Setting up auto-backup (cron job)

To get the backup command to run on a regular basis, you need to setup a cron job. Use something similar to this:

If you are using composer in your project then your WordPress core files might be inside a subfolder, please modify the path to reflect this. If WordPress lives inside "/wp/" then the cron job would look like this:

If you are using forge, then simply add to the server scheduling panel:

forge-schedule

Functions

logflume sync [--direction=]

This function runs sync and a DB backup.

logflume backup_wordpress

This function runs sync and a DB backup.

logflume create_bucket

Created the required bucket and bucket settings for handling media on S3. It's good to use the current hostname.

logflume select_bucket

Use this to change the bucket that log-flume is currently sync to.

logflume check_credentials

Performs a simple S3 function to make sure it can access the selected bucket

logflume autodelete_sql

Setup a S3 lifecycle to auto-delete from the SQL folder after a number of days.

Troubleshooting

Are you receiving an error similar to PHP Fatal error: Uncaught Error: Class 'Aws\S3\S3Client' not found in /path/to/file

Make sure you are requiring your autoload.php generated by composer. We usually add this to the top of our wp-config file:


All versions of log-flume with dependencies

PHP Build Version
Package Version
Requires aws/aws-sdk-php Version 3.24.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package logsmith/log-flume contains the following files

Loading the files please wait ....