Giter Site home page Giter Site logo

grrr-amsterdam / simply-static-deploy Goto Github PK

View Code? Open in Web Editor NEW
68.0 11.0 10.0 244 KB

WordPress plugin to deploy static sites easily to an AWS S3 bucket.

License: MIT License

CSS 1.39% JavaScript 3.68% PHP 94.93%
wordpress wordpress-plugin static-site static-site-generator aws aws-s3 s3 s3-bucket s3-website cloudfront

simply-static-deploy's Introduction

Simply Static Deploy

This repository is archived

❗️ GRRR no longer maintains this plugin.

We recommend using the Pro plan of the Simply Static plugin. When we started this plugin, it fixed the lack of a deployment feature in Simply Static. Since then, the plugin has been updated, and the Pro plan offers exactly what we were missing.
GRRR has contributed code and features to the Simply Static plugin, and we're happy to see it grow.
We suggest taking a look, it's well worth the investment.

Thanks to everyone who has taken an interest in this plugin!
If you've enjoyed using this plugin or were inspired by it in any way, maybe you'd like to follow our blog, where we write about our work and the things we learn along the way: grrr.tech.


Deploy static sites easily to an AWS S3 bucket

  • Utilizes the excellent Simply Static plugin for static site generation.
  • Adds deployment to S3-compatible storage (AWS S3, DigitalOcean Spaces, ...).
  • Adds optional CloudFront CDN invalidation step.
  • Steps can be triggered via a simple user interface or programmatically.
  • Ability to generate and deploy a single page including recursive option
  • Customizable using hooks and actions.

Developed with ❤️ by GRRR

Generate and deploy user interface

Screenshot of Simply Static Deploy plugin interface for WordPress

Single page/post deploy user interface

Screenshot of plugin interface for deploying a single page

Minimum requirements

This plugin requires:

Installation

This plugin needs to be installed using Composer.

Make sure you have the right installer paths configured in your composer.json. This has to be done before requiring the package:

"extra": {
  "installer-paths": {
    "wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
  }
}

Install via Composer:

$ composer require grrr-amsterdam/simply-static-deploy

If you're not using Composer in your project yet, make sure to require the Composer autoloader. A good place would be in your wp-config.php:

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'vendor/autoload.php'; # ‹— add this
require_once ABSPATH . 'wp-settings.php';

Usage

First define SIMPLY_STATIC_DEPLOY_CONFIG in your WordPress configuration:

define('SIMPLY_STATIC_DEPLOY_CONFIG', [
    'aws' => [
        'key' => '...', # AWS access key
        'secret' => '...', # AWS secret key
        'region' => '...', # AWS region
        'bucket' => '...', # S3 bucket
        'bucket_acl' => '...', # S3 bucket ACL (optional, defaults to `public-read`)
        'distribution' => '...', # CloudFront distribution ID (optional, step is skipped when empty)
        'endpoint' => '...', # For usage with providers other than AWS (optional)
    ],
    'url' => '...', # Website url (used for displaying url after deploy is finished)
]);

Then configure the Simply Static plugin via the admin interface. The most important setting to get right is:

  • Delivery Method: set to Local Directory (files are synced to S3, zip won't work)

Other settings which you should pay attention to:

  • Additional URLs: add any URL the plugin is unable to find
  • Additional Files and Directories: add additional directories (for example front-end assets)
  • URLs to Exclude: for example the uploads folder (but only when you're offloading uploads at runtime)

If everything is configured correctly, hit Generate & Deploy in the Deploy tab.

Documentation

Features

Single post deploy

Pages/posts come with single deploy button, so that a single page can be generated and deployed, see single page/post deploy user interface.

Single recursive deploy

A single post or page deploy can also be done recursively by checking the recursive option, see checkbox in single page/post deploy user interface. When 'recursive' has been checked all pages/posts that containt the url of the current page/post will be generated and deployed as well.

Available filters and actions

Available filters to modify settings and data passed to the plugin:

Available actions to invoke or act upon:

Filters

Adjust additional files

Modify entries from the 'Additional Files and Directories' option. By default all paths are temporarily resolved to absolute paths via realpath, to ensure symbolic links are resolved. An array of unmodified files from the options is passed as an argument.

add_filter('simply_static_deploy_additional_files', function (array $files) {
    # Modify files, and possibly resolve paths with `realpath`.
    return $files;
});

Note: during generation of the static site, the additional_files setting is updated. It is restored when finished.

Adjust additional files for Single deploy

When doing a single deploy only the given page/post will be generated, including the files given in the Simply Static 'Additional files' setting. You can change these additional files for single deploys via the simply_static_deploy_single_additional_files filter. It takes two arguments: the first one is an array of filenames, the second one is the Simply Static Options instance.

Adjust additional URLs

Modify entries from the 'Additional URLs' option. This can be useful to add pages that can't be found by Simply Static (not in the sitemap, are excluded by a password, have noindex, etc...). An array of unmodified URLs from the options is passed as an argument.

add_filter('simply_static_deploy_additional_urls', function (array $urls) {
    # Modify urls, for example by adding missing pages.
    return $urls;
});

Note: during generation of the static site, the additional_urls setting is updated. It is restored when finished.

Modify Recursive excludable

This filter adds the option to customize the excludable url setting. This can be useful when for instance you want to ignore exclusions when an url contains the recursive parent url.

add_filter('simply_static_deploy_recursive_excludable', function (
    $excludable,
    string $staticPageUrl,
    string $recursiveUrl
) {
    # Modify excludable url logic, for example ignore excludeable url setting when current page contains the recursiveUrl
    return $excludable;
});

Actions

Handle errors

Called from the plugin, and receives a WP_Error object explaining the error. You can decide how to handle the error, for instance by logging it with a service of choice.

add_action('simply_static_deploy_error', function (\WP_Error $error) {
    # Handle the error.
});
Completed static deploy job

This will be triggered after all deploy tasks are finished. The first and only argument you will get in the callback function is the Simply Static options instance.

add_action('simply_static_deploy_complete' , function (\Simply_Static\Options $options) {
    // Finished static deploy job.
});
Modify generated files

Called when Simply Static is done generating the static site. This allows you to modify the generated files before they're being deployed. The static site directory is passed as an argument.

add_action('simply_static_deploy_modify_generated_files', function (
    string $directory
) {
    # Modify generated files, like renaming or moving them.
});
Schedule deploys

Schedule a deploy event.

Arguments:

  • Time: should be a simple time string, it is automatically converted to a UNIX timestamp in the configured WordPress timezone.
  • Interval: accepted values are hourly, twicedaily and daily. Can be extended via cron_schedules.
do_action('simply_static_deploy_schedule', '12:00', 'daily');

Note: it is important that WP-Cron is called regularly. You could do so by disabling the default WP-Cron mechanism and switch to calling it via a dedicated cronjob.

To disable the default WP–Cron (which is normally called when a user visits pages), add the following to your WordPress configuration:

define('DISABLE_WP_CRON', true);

Create a cronjob calling the WordPres WP-Cron. Setting it to every 5 minutes would be a good default. For example via crontab -e on a Linux machine:

*/5 * * * * curl https://example.com/wp/wp-cron.php?doing-cron > /dev/null 2>&1

Common issues

Fatal error: Uncaught Error: Class 'Grrr\SimplyStaticDeploy\SimplyStaticDeploy' not found

Check the installation instructions, and require the Composer autoloader in your project.

simply-static-deploy's People

Contributors

elreydetoda avatar hammenws avatar harmenjanssen avatar martijngastkemper avatar qmeister avatar schoenkaft 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simply-static-deploy's Issues

Check all namespaces & adjust include/classes folder structure

  • Should we keep using Grrr\SimplyStaticDeploy or should it simply be SimplyStaticDeploy. I think Simply_Static_Deploy is even more in line with WordPress, but we're not following coding standards anyway, so that might be a bit 'ugly' in our setup anyway.
  • Same goes for WP_Error and namespaces cloudfront_invalidation_error, grrr_simply_static_deploy_syncer, ...
  • Also assets/views: mostly GRRR/grrr namespaced
  • Remove Grrr\SimplyStaticDeploy folder structure and adjust in psr-4 entry in Composer file.

500 Error on multisite WP when activate plugin

PHP Version: 7.3
WordPress Version: 5.4.1

I get 500 error when activating the plugin through network admin. In the hosting logs there is:

PHP Fatal error:  Uncaught Error: Class 'Grrr\SimplyStaticDeploy\SimplyStaticDeploy' not found in /nas/content/live/cooplenlprod/wp-content/plugins/simply-static-deploy/simply-static-deploy.php:25

Stack trace:

#0 /nas/content/live/cooplenlprod/wp-settings.php(319): include_once()
#1 /nas/content/live/cooplenlprod/wp-config.php(162): require_once('/nas/content/li...')
#2 /nas/content/live/cooplenlprod/wp-load.php(37): require_once('/nas/content/li...')
#3 /nas/content/live/cooplenlprod/wp-blog-header.php(13): require_once('/nas/content/li...')
#4 /nas/content/live/cooplenlprod/index.php(17): require('/nas/content/li...')
#5 {main}
  thrown in /nas/content/live/cooplenlprod/wp-content/plugins/simply-static-deploy/simply-static-deploy.php on line 25

To ensure autoload.php is present:

Screen Shot 2020-05-20 at 21 09 15

autoloader.php content:

<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitced33dc59fcf74571589a736783f57db::getLoader();

wp-config.php
Screen Shot 2020-05-21 at 13 23 24

Generate is not working

Trying to generate through the plugin, it fails.
Using the original plugin generate then sync - works.

In this menu - clicking tasks, showing them and syncing manually to S3 does works, but not generate.
image

How can I debug this? is there a log somewhere to see what or why something is wrong?
In diagnostics everything is "green"

Thanks

Investigate error message when activating the plugin

Consistently shows:

The plugin generated 270 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

Activation error

Hi,

when activating the plugin, the following error pops up:

Fatal error: Uncaught Error: Class 'Grrr\SimplyStaticDeploy\SimplyStaticDeploy' not found in /var/www/wordpress/wp-content/plugins/simply-static-deploy/simply-static-deploy.php:25 Stack trace: #0 /var/www/wordpress/wp-admin/includes/plugin.php(2255): include() #1 /var/www/wordpress/wp-admin/plugins.php(177): plugin_sandbox_scrape('simply-static-d...') #2 {main} thrown in /var/www/wordpress/wp-content/plugins/simply-static-deploy/simply-static-deploy.php on line 25

System is a vanilla Wordpress 5.4 with 3 plugins: Simply Static, WP Offload Media Lite and the to get activated Simply Static Deploy. Installed via composer to /vendor/, copied over manually to /wp-content/plugins/ as composer didn't move it despite installer-paths set.

Make Archive->clear_directory dynamic or hookable

Saw the clear_directory method in the Archive still checks is if the name of the directory is static. Which only works when you call it like that. So that whole check should go if we want this function to work with any name.

The issue is that it will remove any directory inputted as the Local Directory in the configuration. If you make a stupid mistake, this could wipe your whole system.

So:

  • Should we just wipe it, and hope no one makes a mistake?
  • Should we keep it as is, and only wipe it for people who call it static (which is a bit lame, but until now that was kind of fine).
  • Should we let it be explicitly called by a filter or action? In that case it might still have the same flaw as the first option.
  • Only wipe it when options are set via 'enforced settings'? Which are not implemented yet.
  • ...

@harmenjanssen @HammenWS any thoughts?

Release version v1.0.0

Else updating is impossible without resorting to version constraints like v0.*. Composer handles pre v1 releases differently.

Error on plugin install

When trying to add the plugin I get the following hard crash:

Uncaught TypeError: Argument 3 passed to Garp\Functional\reduce() must be an instance of Garp\Functional\iterable, array given, called in /var/www/wordpress/main/wp-content/plugins/simply-static-deploy/includes/DependencyList.php on line 25 and defined in /var/www/wordpress/main/wp-content/plugins/simply-static-deploy/vendor/grrr-amsterdam/garp-functional/functions/reduce.php:20\nStack trace:\n#0 /var/www/wordpress/main/wp-content/plugins/simply-static-deploy/includes/DependencyList.php(25): Garp\Functional\reduce(Object(Closure), true, Array)\n#1 /var/www/wordpress/main/wp-content/plugins/simply-static-deploy/includes/SimplyStaticDeploy.php(27): Grrr\SimplyStaticDeploy\DependencyList->are_met()\n#2 /var/www/wordpress/main/wp-includes/class-wp-hook.php(288): Grrr\SimplyStaticDeploy\SimplyStaticDeploy->plugins_loaded('')\n#3 /var/www/wordpress/main/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)\n#4 /var/www/wordpress/main/wp-includes/plugin.php(478): WP_Hook->do_action(Array)\n#5 /var/www/wor in /var/www/wordpress/main/wp-content/plugins/simply-static-deploy/vendor/grrr-amsterdam/garp-functional/functions/reduce.php on line 20

Error on activation

I've installed as per instructions (from the root of my install), the plugin installs to the correct directory, but when trying to activate I get the following error.

( ! ) Fatal error: Uncaught Error: Class 'Grrr\SimplyStaticDeploy\SimplyStaticDeploy' not found in /app/public/wp-content/plugins/simply-static-deploy/simply-static-deploy.php on line 25
( ! ) Error: Class 'Grrr\SimplyStaticDeploy\SimplyStaticDeploy' not found in /app/public/wp-content/plugins/simply-static-deploy/simply-static-deploy.php on line 25
Call Stack

Time Memory Function Location

1 0.0001 402440 {main}( ) .../plugins.php:0
2 0.1455 7230584 plugin_sandbox_scrape( ) .../plugins.php:177
3 0.1455 7230936 include( '/app/public/wp-content/plugins/simply-static-deploy/simply-static-deploy.php' ) .../plugin.php:2255

Refactor of Util class in simply-static

I've installed the last version of simply-static and simply-static-deploy, but when I try to do a single deploy, I have the following error:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Simply_Static\Util::delete_debug_log() in /var/www/html/home/wp-content/plugins/simply-static-deploy/includes/Api.php:104

I've seen there is a refactor of this method in this commit:
Simply-Static/simply-static@df65c01

delete_debug_log seems to become clear_debug_log in the following rows:
includes/Api.php:89
includes/Api.php:104

Resume sync when interrupted, not start all over again.

Hi,

I have run into a problem with syncing task, which can stuck in an infinite loop and it uploads files to the AWS bucket over and over again. This occurs when static files are big and execution time is short. I can't change execution time or shrink static data.

Also, it would be great, if the deploy sequence can be canceled by some button, not by deactivation plugin.

An error occurred: Call to undefined method GuzzleHttp\Utils::chooseHandler()

Error on StaticDeployJob.

debug.txt (end of file)

[2021-08-17 21:01:24] [StaticDeployJob.php:232] We've found our next task: sync
[2021-08-17 21:01:24] [StaticDeployJob.php:190] Current task: sync
[2021-08-17 21:01:24] [StaticDeployJob.php:208] Performing task: sync
[2021-08-17 21:01:24] [SyncTask.php:18] Sync site to s3
[2021-08-17 21:01:24] [class-ss-task.php:44] Status message: [sync] Syncing files to S3
[2021-08-17 21:01:24] [StaticDeployJob.php:211] Caught an error
[2021-08-17 21:01:24] [StaticDeployJob.php:359] An error occurred: Call to undefined method GuzzleHttp\Utils::chooseHandler()
[2021-08-17 21:01:24] [StaticDeployJob.php:360] object(Error)#15794 (7) {  ["message":protected]=>  string(58) "Call to undefined method GuzzleHttp\Utils::chooseHandler()"  ["string":"Error":private]=>  string(0) ""  ["code":protected]=>  int(0)  ["file":protected]=>  string(65) "/opt/bitnami/wordpress/vendor/guzzlehttp/guzzle/src/functions.php"  ["line":protected]=>  int(61)  ["trace":"Error":private]=>  array(15) {    [0]=>    array(3) {      ["file"]=>      string(92) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/HandlerStack.php"      ["line"]=>      int(42)      ["function"]=>      string(25) "GuzzleHttp\choose_handler"    }    [1]=>    array(5) {      ["file"]=>      string(86) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/Client.php"      ["line"]=>      int(65)      ["function"]=>      string(6) "create"      ["class"]=>      string(23) "GuzzleHttp\HandlerStack"      ["type"]=>      string(2) "::"    }    [2]=>    array(5) {      ["file"]=>      string(108) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Handler/GuzzleV6/GuzzleHandler.php"      ["line"]=>      int(26)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(17) "GuzzleHttp\Client"      ["type"]=>      string(2) "->"    }    [3]=>    array(5) {      ["file"]=>      string(63) "/opt/bitnami/wordpress/vendor/aws/aws-sdk-php/src/functions.php"      ["line"]=>      int(279)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(34) "Aws\Handler\GuzzleV6\GuzzleHandler"      ["type"]=>      string(2) "->"    }    [4]=>    array(3) {      ["file"]=>      string(81) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Sdk.php"      ["line"]=>      int(373)      ["function"]=>      string(24) "Aws\default_http_handler"    }    [5]=>    array(5) {      ["file"]=>      string(90) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Aws/ClientProvider.php"      ["line"]=>      int(25)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(7) "Aws\Sdk"      ["type"]=>      string(2) "->"    }    [6]=>    array(5) {      ["file"]=>      string(78) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Syncer.php"      ["line"]=>      int(38)      ["function"]=>      string(11) "__construct"      ["class"]=>      string(42) "Grrr\SimplyStaticDeploy\Aws\ClientProvider"      ["type"]=>      string(2) "->"    }    [7]=>    array(5) {      ["file"]=>      string(86) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Tasks/SyncTask.php"      ["line"]=>      int(25)      ["function"]=>      string(4) "sync"      ["class"]=>      string(30) "Grrr\SimplyStaticDeploy\Syncer"      ["type"]=>      string(2) "->"    }    [8]=>    array(5) {      ["file"]=>      string(87) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/StaticDeployJob.php"      ["line"]=>      int(209)      ["function"]=>      string(7) "perform"      ["class"]=>      string(38) "Grrr\SimplyStaticDeploy\Tasks\SyncTask"      ["type"]=>      string(2) "->"    }    [9]=>    array(5) {      ["file"]=>      string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"      ["line"]=>      int(301)      ["function"]=>      string(4) "task"      ["class"]=>      string(39) "Grrr\SimplyStaticDeploy\StaticDeployJob"      ["type"]=>      string(2) "->"    }    [10]=>    array(5) {      ["file"]=>      string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"      ["line"]=>      int(175)      ["function"]=>      string(6) "handle"      ["class"]=>      string(21) "WP_Background_Process"      ["type"]=>      string(2) "->"    }    [11]=>    array(5) {      ["file"]=>      string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"      ["line"]=>      int(303)      ["function"]=>      string(12) "maybe_handle"      ["class"]=>      string(21) "WP_Background_Process"      ["type"]=>      string(2) "->"    }    [12]=>    array(5) {      ["file"]=>      string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"      ["line"]=>      int(327)      ["function"]=>      string(13) "apply_filters"      ["class"]=>      string(7) "WP_Hook"      ["type"]=>      string(2) "->"    }    [13]=>    array(5) {      ["file"]=>      string(45) "/opt/bitnami/wordpress/wp-includes/plugin.php"      ["line"]=>      int(470)      ["function"]=>      string(9) "do_action"      ["class"]=>      string(7) "WP_Hook"      ["type"]=>      string(2) "->"    }    [14]=>    array(3) {      ["file"]=>      string(46) "/opt/bitnami/wordpress/wp-admin/admin-ajax.php"      ["line"]=>      int(187)      ["function"]=>      string(9) "do_action"    }  }  ["previous":"Error":private]=>  NULL}
[2021-08-17 21:01:24] [StaticDeployJob.php:315] Status message: [error] An error occurred: Call to undefined method GuzzleHttp\Utils::chooseHandler()
[2021-08-17 21:01:24] [StaticDeployJob.php:190] Current task: cancel
[2021-08-17 21:01:24] [StaticDeployJob.php:208] Performing task: cancel
[2021-08-17 21:01:24] [class-ss-task.php:44] Status message: [cancel] Cancelling job
[2021-08-17 21:01:24] [class-ss-wrapup-task.php:22] Deleting temporary files
[2021-08-17 21:01:24] [class-ss-task.php:44] Status message: [wrapup] Wrapping up
[2021-08-17 21:01:24] [StaticDeployJob.php:227] This task is done and there are no more tasks, time to complete the job
[2021-08-17 21:01:24] [StaticDeployJob.php:259] Completing the job
[2021-08-17 21:01:24] [StaticDeployJob.php:315] Status message: [done] Done! Finished in 00:02:31
{
  ["message":protected] =>  string(58) "Call to undefined method GuzzleHttp\Utils::chooseHandler()" 
  ["string":"Error":private] =>  string(0) "" 
  ["code":protected] =>  int(0)
  ["file":protected] =>  string(65) "/opt/bitnami/wordpress/vendor/guzzlehttp/guzzle/src/functions.php"
  ["line":protected] =>  int(61)
  ["trace":"Error":private] =>  array(15) {
    [0] => array(3) {
        ["file"] => string(92) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/HandlerStack.php"
        ["line"] => int(42) 
        ["function"] => string(25) "GuzzleHttp\choose_handler"
    }
    [1] => array(5) { 
      ["file"] => string(86) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/Client.php"
      ["line"] => int(65) 
      ["function"] => string(6) "create" 
      ["class"] => string(23) "GuzzleHttp\HandlerStack" 
      ["type"] => string(2) "::"
    } 
    [2] => array(5) { 
      ["file"] => string(108) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Handler/GuzzleV6/GuzzleHandler.php"
      ["line"] => int(26)
      ["function"] => string(11) "__construct" 
      ["class"] => string(17) "GuzzleHttp\Client"
      ["type"]=> string(2) "->"
    }
    [3] => array(5) {
      ["file"] => string(63) "/opt/bitnami/wordpress/vendor/aws/aws-sdk-php/src/functions.php"
      ["line"] => int(279)
      ["function"] => string(11) "__construct"
      ["class"] => string(34) "Aws\Handler\GuzzleV6\GuzzleHandler"
      ["type"] => string(2) "->"
    }
    [4]=>    array(3) {
      ["file"] => string(81) "/bitnami/wordpress/wp-content/plugins/backwpup/vendor/aws/aws-sdk-php/src/Sdk.php"
      ["line"] => int(373)
      ["function"] => string(24) "Aws\default_http_handler"    
    }
    [5]=>    array(5) {
      ["file"] => string(90) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Aws/ClientProvider.php"
      ["line"] => int(25)
      ["function"] => string(11) "__construct"
      ["class"] => string(7) "Aws\Sdk"
      ["type"] => string(2) "->"
    }
    [6] => array(5) {
      ["file"] => string(78) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Syncer.php"
      ["line"] => int(38)
      ["function"] => string(11) "__construct"
      ["class"] => string(42) "Grrr\SimplyStaticDeploy\Aws\ClientProvider"
      ["type"] => string(2) "->"
    }
    [7] => array(5) {
      ["file"] => string(86) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/Tasks/SyncTask.php"
      ["line"] => int(25)
      ["function"] => string(4) "sync"
      ["class"] => string(30) "Grrr\SimplyStaticDeploy\Syncer"
      ["type"] => string(2) "->"
    }
    [8] => array(5) {
      ["file"] => string(87) "/bitnami/wordpress/wp-content/plugins/simply-static-deploy/includes/StaticDeployJob.php"
      ["line"] => int(209)
      ["function"] => string(7) "perform"
      ["class"] => string(38) "Grrr\SimplyStaticDeploy\Tasks\SyncTask"
      ["type"] => string(2) "->"
    }
    [9] => array(5) {
      ["file"] => string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"
      ["line"] => int(301)
      ["function"] => string(4) "task"
      ["class"] => string(39) "Grrr\SimplyStaticDeploy\StaticDeployJob"
      ["type"] => string(2) "->"
    }
    [10] => array(5) {
      ["file"] => string(128) "/bitnami/wordpress/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php"
      ["line"] => int(175)
      ["function"] => string(6) "handle"
      ["class"] => string(21) "WP_Background_Process"
      ["type"] => string(2) "->"
    }
    [11] => array(5) {
      ["file"] => string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"
      ["line"] => int(303)
      ["function"] => string(12) "maybe_handle"
      ["class"] => string(21) "WP_Background_Process"
      ["type"] => string(2) "->"
    }
    [12] => array(5) {
      ["file"] => string(52) "/opt/bitnami/wordpress/wp-includes/class-wp-hook.php"
      ["line"] => int(327)
      ["function"] => string(13) "apply_filters"
      ["class"] => string(7) "WP_Hook"
      ["type"] => string(2) "->"
    }
    [13] => array(5) {
      ["file"] => string(45) "/opt/bitnami/wordpress/wp-includes/plugin.php"
      ["line"] => int(470)
      ["function"] => string(9) "do_action"
      ["class"] => string(7) "WP_Hook"
      ["type"] => string(2) "->"
    }
    [14] => array(3) {
      ["file"] => string(46) "/opt/bitnami/wordpress/wp-admin/admin-ajax.php"
      ["line"] => int(187)
      ["function"] => string(9) "do_action"
    }
  }
  ["previous":"Error":private] =>  NULL
}

PHP requirements

When trying to install using composer I get this error message:
[InvalidArgumentException]
Package grrr-amsterdam/simply-static-deploy at version has a PHP requireme
nt incompatible with your PHP version (5.6.30)

Not sure what this could mean?

Webserver is nginx running PHP 7.3.2 and SQL 5.7.23

Expecting "("

Hello!

I just did a fresh install and I'm getting this error:

[Fri Aug 05 19:40:28.936902 2022] [proxy_fcgi:error] [pid 1940:tid 139770634098432] [client 73.254.239.105:65010] AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected token "match", expecting "(" in /opt/bitnami/wordpress/vendor/grrr-amsterdam/garp-functional/functions/match.php on line 18', referer: http://mydomain.com/wp-admin/

If you are open to a paid engagement to fix this, let me know. Thanks for your contribution!

"Bundle generation in progress, please wait!" during forever. Send only part of the files to the bucket.

When using the "Generete & deploy" action, the plugin correctly generates the static files in the selected local folder (I could verify this by accessing via FTP or even the URL of the files). In Simple static > Generate, I can track the status and there it also shows that the files were generated correctly, in the log it says "Syncing files to S3" and in the bucket on S3 I can verify that most of the files were sent, but not all.

Extra details:

  • I have the cron configured to run via UNIX (And I disabled the default cron in wp-config.php)
  • PHP version 7.4
  • I've already tested it with version 2.0.7 and 2.1 of the plugin
  • I repeated the installation and testing more than once, waiting hours to see if the process ended later, but I could see that it only runs for the first few minutes and then stops
  • I can't cancel/retry the process through the UI, I always need to restore a database backup to be able to repeat the process
  • Apparently no error log is generated on PHP errors

Can anyone help me with this?

Thanks in advance!

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.