Git Product home page Git Product logo

simply-static's Introduction

=== Simply Static ===
Contributors: patrickposner
Tags: HTML, static website generator, static site, secure, fast
Requires at least: 6.3
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 3.1.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Create a static website directly from your WordPress website with Simply Static.

== Description ==

Simply Static is a static site generator that converts your existing WordPress website to a static website that you can host on your server, a static hosting provider, or a CDN.

It drastically improves the performance of your website and minimizes security risks as it removes the connection between your traditional server and your static website.

Simply Static can also be used by local development tools like LocalWP or Lando to develop your website offline and push the static site online.

This reduces your hosting costs to zero (depending on your requirements and the used service/provider).

= Performance =

Converting your website to a static website can drastically improve your performance. Simply Static eliminates all requests to your database and by that reducing the first time to byte.

This is especially impactful for websites that use long pages with a lot of animations, graphs, and other load-heavy tools like sliders.

= Security =

Removing the connection to your database and traditional server reduces the risk of getting hacked. 

This reduces the stress to keep your WordPress website up to date and keeps your data secure (locally or in a protected environment).

= Reduce hosting costs =

Using Simply Static to deploy your website to one of the static hosting providers, a CDN or an S3 bucket reduces the amount of money required for reliable web hosting.

With the right setup, you can even host your website completely for free (Cloudflare Pages and GitHub Pages for example).

= Local development =

Develop your site locally and only push the static exported website on a server. To ensure everything works as expected I created a list of development tools that are completely supported:

* [LocalWP](https://localwp.com/)
* [lando](https://docs.lando.dev/)

I highly recommend not to use another tool for local development if you are not a programmer as in most cases manual package installation is required.

== Simply Static Pro ==

The pro version of Simply Static enhances the plugin with various features.

[youtube https://www.youtube.com/watch?v=PTuw1ChYCdI]

= GitHub Integration =

With the GitHub integration, you can completely automate your entire development process.

The only thing you need is a GitHub account, no knowledge of Git or GitHub itself is required, as Simply Static Pro handles the entire process for you and keeps your repository up to date.

This allows deploying your static website to:

* GitHub Pages
* Cloudflare Pages
* Netlify
* Vercel
* SFTP to your server


= AWS S3 Integration =

Export directly to Amazon AWS S3 from Simply Static Pro. Connect your bucket and run your export.


= BunnyCDN Integration =

Export directly to BunnyCDN and get all the benefits of their CDN - including caching, file optimization and DNS management.


= Builds and Single Exports =

Create builds to export only a subset of pages/posts. You can assign a build to every custom post type in your WordPress admin area and export them.

Never sit back and watch a full static export running, instead run a complete export once and then use builds to export the changes as fast as possible.

You can also export single pages/posts after changed something.


= Forms =

Simply Static Pro supports Contact Form 7 and Gravity Forms to use on your static website.

You can decide if you want to use an external service like Zapier and IFTTT or if your original WordPress website should handle the submission and send you an e-mail with all the details.


= Search =

Use a fully static search solution that does not rely on any Third-Party-Providers. It uses Fuse.js and creates an index of your whole website as a JSON file.

The search supports autosuggestion and fuzzy logic and is by default way more convenient than your default WordPress search.


= Comments =

Enable comments on your static website without the requirement of Third-Party-Providers. Use your original WordPress website to process the comment.

After a comment was submitted, Simply Static automatically exports a new static version of the post. You don't have to do anything.


= Multilingual =

Use WPML, Polylang or TranslatePress and run static exports per language or all at once.

Simply Static Pro also supports configuring settings per language, using the available language switchers and more to export a your multilingual website as easy as possible.


= WP-CLI =

Simply Static Pro has a detailed and comprehensive integration with WP-CLI.

Control every option, run different kinds of exports and more with the WP-CLI integration.

= Minification =

Automatically minfiy HTML, CSS and JavaScript files on your static site.

We can even minify inline CSS & JavaScript.

= Optimization =

Replace default WordPress paths and completely hide that you are using WordPress behind the scenes.

Replace:

* wp-content
* wp-includes
* wp-content/plugins/
* wp-content/themes/
* wp-content/uploads/


Hide & Disable:

Disabled unwanted features in WordPress before running an static export like:

* XML-RPC
* REST API URLs
* Emoji support
* Shortlink support
* WordPress version in HTML

and much more.

= Get the Pro version =

You can get the pro version [here](https://simplystatic.com/pro/).

= Tutorials =

We publish new tutorials on how to work with Simply Static and other tools on our blog.

You can check the latest tutorials [here](https://simplystatic.com/tutorials/)

= Documentation =

We have a super extensive documentation that covers every aspect of Simply Static and Simply Static Pro.

You can check the documentation [here](https://docs.simplystatic.com)


== Installation ==

1. Log into your WordPress website.
2. On the left menu, hover over Plugins and then click on Add New.
3. In the Search Plugins box, type in "Simply Static" and press the Enter key.
4. You will see a list of search results that should include the Simply Static plugin. Click on the Install Now button to install the plugin.
5. After installing the plugin you will be prompted to activate it. Click on the Activate Plugin link.
6. The Simply Static plugin is now installed and can be found on the left menu.

or

1. Upload the entire `simply-static` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.

== Frequently Asked Questions ==

= What does Simply Static do? =

Simply Static generates static (HTML) copies of your WordPress pages. It works a bit like a web crawler, starting at the main page of your website and looking for links to other pages to create static copies of. It also includes any images, CSS & JS files, and any other files that it can find a link to.

As Simply Static is creating the static pages, it will automatically replace the URLs for the WordPress installation with either (a) absolute URLs, at a domain of your choice or (b) relative URLs, so you can host the static files on any domain or (c) URLs constructed for offline use, so you can browse the site locally on your computer.

= Who should use Simply Static? =

Pretty much everyone, besides e-commerce or membership sites. They require a serious amount of interaction and user accounts, which are not available on a static website.

= Are there any limitations? =

You can not use plugins that require a login as there is no account system on a static website. This applies to e-commerce (like WooCommerce) or membership sites.

Also, a website that relies heavily on ajax to update content in real-time is not the best project for Simply Static as a serious amount of custom development would be required.

= How do I set up Simply Static? =

Let's assume you presently have WordPress hosting a site at www.example.com, and that's where you'd like to have your static site instead. Your first task is going to be to move your WordPress installation to a subdomain, such as wordpress.example.com. Once that is complete, you'll set up www.example.com to receive your static files.

If www.example.com is on the same server as your WordPress installation, you can have Simply Static copy the static files to the directory that www.example.com is serving files from. If www.example.com is on a different server, you can download a zip of your static files and then upload them to www.example.com.

= Will this plugin interfere with other plugins? =

No, Simply Static will not interfere with other plugins. Simply Static works well alongside other plugins, such as plugins to improve your site's SEO.

Simply Static creates a static copy of your website, which is just a collection of files: HTML, CSS, JS, images, etc. Any functionality that requires PHP code will not work with that static copy. That includes, but is not limited to: blog post comments, contact forms, forums, membership areas, and eCommerce.

Note that you can achieve much of this functionality by using plugins that interact with third-party services or Simply Static Pro.

= How is Simply Static different from cache plugins? =

Cache plugins -- such as W3 Total Cache or WP Super Cache -- make your existing WordPress site faster by caching pages as they're visited. This makes your site much faster but still leaves your WordPress installation accessible to the outside world. Unless you keep on top of updates, your WordPress installation can become vulnerable to hackers due to security vulnerabilities that are found over time.

Simply Static creates a static copy of your WordPress site that is intended to be used completely separately from your WordPress installation. Your WordPress installation lives on one server and your static site is served on a different server. Or, they're both on the same server, but your WordPress installation is restricted to only allow access from certain IP addresses or with an additional username/password requirement. Your static site is just a collection of static files with no server-side code or database -- nothing for hackers to hack -- while your WordPress installation remains safe and secure.

== Screenshots ==

1. Generate
2. Settings
3. Diagnostics

== Changelog ==

= 3.1.7 =

* Official PHP 8.2 and 8.3 support + fixes for various PHP notices
* fixed saving multiline settings savings process
* improved default settings on first installation + reset
* extended the match_tags list for better XML support
* improved URL handling when creating 404 pages
* automated 404 page handling for various deployment options
* added cache detection solution as part of diagnostics
* added incompatible plugin detection as part of diagnostics
* added notification logic if tests in diagnostics fail
* improved XML sitemap handling in all SEO integrations
* auto-include robots.txt file if exists

= 3.1.6.3 =

* no more filesize limits on wp_remote_get()
* removed empty settings page on network admin
* improved various descriptions + added links to the documentation
* added filter to set conditions before clearing local directory
* avoid clearing special characters from Basic Auth credentials
* auto-cancel export if Basic Auth is set and credentials don't match
* improved default settings handling
* extended plugin compatibility list up to 100 (from 30)
* unified 404 page option for CDN exports

= 3.1.6.2 =

* new filter for extended DOM manipulation
* fixed typos for optimization settings
* exclude builds and single exports from clear directory

= 3.1.6.1 =

* modified default parameters for ss_remote_args filter (file size based on uploads limit)

= 3.1.6 =

* new multisite integration (network, import/export subsites)
* improved 404 page handling
* improved secure debug log handling
* plugin compatibility database integration
* admin UI improvements (labels, helper texts..)
* updated translation files
* improved version output in admin UI

= 3.1.5 =

* refactored additional settings
* introduced setting for origin URL
* removed unused helper methods
* improved requests to itself check in diagnostics
* improved sanitization for multiline fields
* load textdomain in init hook instead of plugins_loaded
* NPM packages updated to latest releases


= 3.1.4 =

* added log for replacing 404 pages
* fix for 404 page in local directory exports
* clear log before running new export to avoid big file sizes
* extended ss_remote_args filter with async requests + max file size per request
* improved sanitization for import/export settings
* added filter for local URL check
* improved secure log handling (dynamic filename + .htaccess rule)

= 3.1.3 =

* JS dependencies updated
* refactored filter implementation for tasks
* added check for empty strings in excludes
* removed unused blog_id check
* changed location of debug log to uploads dir
* check for Rest API in diagnostics
* increased PHP version for diagnostics >= 8.0
* whitelist Freemius API calls if Basic Auth enabled

= 3.1.2 =

* WordPress 6.4 compatibility
* Improved clearing logs
* improved capability filter

= 3.1.1 =

* improved admin UI descriptions in general settings
* added support for 404 pages
* added error message to WP_Error when archive dir cannot be created
* added add_status_message method to Simply_Static\Options for WP CLI handling

= 3.1.0 =

* fix for scheme/host when resetting settings
* enhanced integration setups (GitHub objects)
* fixed example for relative path setups in settings


= 3.0.9 =

* PHP 8.2 support improved
* wp_parse_url instead of just parse_url for fetching URLs
* enhanced default options
* increased min WP version

= 3.0.8 =

* SimplyCDN auto include files
* min WP version increased to 6.2
* improved wording for progress in export log
* improved Basic Auth handling
* improved absolute URL replacement
* Elementor integration: prevent replacing non strings in HTML


= 3.0.7 =

* SimplyCDN setting now in React Admin UI
* filter for capabilities in Rest routes
* SimplyCDN improvements for webhook handling


= 3.0.6 =

* removed type hints in Rest API abstraction for PHP 7.4 support
* make sure we only trigger maybe_wp_die() if there is an error on export

= 3.0.5 =

* fixed incompatibility with EWWW image optimizer

= 3.0.4 =

* simplified url_exclude upgrade on update
* disable browser autocomplete on basic auth settings
* added additional notice with button in settings panel if all auto-migration fails

= 3.0.3 =

* specific version check for migration handler
* fixed schema option updates

= 3.0.2 =

* fixed iterator for "clear_local_directory" option
* reworked "force_replace_urls" to the new options patterns (boolean)

= 3.0.1 =

* prevent error on merge excludes if not an array
* bust object cache after migration

= 3.0 =

* new admin UI for settings
* new admin UI for diagnostics
* new admin UI for generate
* ported ajax requests to Rest API for better performance and maintainability
* improved diagnostics with better (and more meaningful) error messages
* conditional settings for certain setups
* improved support for Windows Azure (path conversion)
* auto-migration from old settings + manuall trigger
* import and export settings via JSON

= 2.3.2 =

* bugfix: Elementor asset loading via webpack
* repositioned filter for HTTPS args to be able to modify all arguments
* latest version of WP Background processing added

= 2.3.1 =

* improved Elementor asset handling (free and pro version)
* new filter to modify excludes

= 2.3.0 =

* fix for Yoast sitemap inclusion
* better approach to extract URLs from HTML
* added support for WP-CLI integration
* better task handling with ajax and WP-Cron with progress without reload
* better quote handling in JSON
* improved SimplyCDN integration and security token handling
* fix for redirect pages by removing query args before saving
* fix for Elementor Pro for data attributes

= 2.2.9 =

* constants for Simply CDN implemented
* remaining pages as argument in fetch URLs task
* fixed log updates if running with WP-Cron
* match_tags improvements for lazyload
* fixed inline CSS extraction to avoid trailingslash for hexcodes

= 2.2.8 =

* SimplyCDN form improvement for Elementor forms
* reset settings now in Advanced tab
* removed unused settings for MU integration
* added <span> tags to match_tags list
* improved XML Sitemap handling with Yoast SEO
* lowered min cURL version in diagnostics

= 2.2.7 =

* SimplyCDN integration
* added hooks for multisite integration
* Elementor Pro support (Lottie files and videos)
* fixed log time with correct timezone
* removed WP-Cron option, now handled automatically

= 2.2.6 =

* fixed typo in CookieYes integration class

= 2.2.5 =

* integration for CookieYes GPDR plugin
* integration for Brizy Builder (image extraction)
* fixed 301 redirections with Redirection plugin
* fallback solution for existing pages not being crawled due to URL parameter

= 2.2.4 =

* reverted blackslash extraction producing invalid markup in CSS + JS
* remember configuration for destination (while switching options)
* unique nonce for Simply Static Ajax request to fix conflict with MiniOrange SSL On plugin
* removed simply_static_page query parameters from URL on static site
* automatically remove quotation marks on save additional URL/File

= 2.2.3 =

* min PHP version increased to 7.4
* ability to include files without filetype (_header)
* Elementor support for bundled JS files
* improved URL extraction in JS and HTML files

= 2.2.2 =

* XML Sitemap auto-include for Yoast
* XML Sitemap auto-include for RankMath
* XML Sitemap auto-include for AllInOneSEO
* XML Sitemap auto-include for SEOPress

= 2.2.1.1 =

* improved path conversion for Windows
* more fail-safe check for deleting local directory before export
* WPCS code style updates

= 2.2.1 =

* fixed path resolution on local path exports

= 2.2 =

* improved URL replacement in script tags
* fixed clear directory before export when using local path exports
* added action fired after ZIP file created
* fixed path replacement for Windows filesystems in Additional Files and Directories
* untrailingslash path on transfer files locally

= 2.1.9 =

* flag for cron execution with UNIX cron
* additional save button in advanced settings
* added filter to change the zip file name
* increased refresh time for Ajax ping

= 2.1.8 =

* new option to replace URLs with regex
* new option to clear local directory before running a new export
* decreased default batch size to prevent timeouts
* decreased ping timer for faster log views
* added filter to modify remote_get arguments
* add actions to send messages/notifications based on task progress (ss_completed)

= 2.1.7.1 =

* added exception handling for <style> and <script> tag extractions

= 2.1.7 =

* improved Basic Auth handling allowing access for external APIs
* parse content of script tags for URL replacements
* improved tags with HTML5 tags for header, footer, section and figure
* added style attributes to match_tags for a, div, section and more

= 2.1.6 =

* adding <link> and <meta> tags to extractor class
* validating URLs in meta tags and update them

= 2.1.5.9 =

* better decoding/encoding of URLs
* added filter to modify default file extension
* improved tag based extraction and removed catch all
* added <picture> tags to extractor
* increased default batch size
* file path check improvements

= 2.1.5.8 =

* added SSL to diagnostics
* added filter for origin URL
* increased general ping time
* Windows support: replacing paths

= 2.1.5.7 =

* http_request_args filter added for better performance with Basic Authentication
* Windows compatibility fix for path conversion
* reverted delete local directory for local dir exports (original merge request)
* added filter for options getter
* cleaned up WP Cron conditional

= 2.1.5.6 =

* fixed non-valid HTML character error
* UI improvement for running static exports
* better http_request_args filter usage
* ss_before_static_export action added
* udpdated dependencies

= 2.1.5.5 =

* cleaned up upgrade handler

= 2.1.5.4 =

* reverted meta tags in extraction

= 2.1.5.3 =

* webp support (source tag)
* imagify support
* action to trigger functions before static export
* added meta tags to extractor for twitter cards and og tags
* added filter to extend matched_tags
* added action to run before static export
* updated composer dependencies

= 2.1.5.2 =

* introduced ss_finished_fetching_pages hook
* introduced ss_finished_transferring_files_locally hook
* fixed DB migration process performance issue
* small CSS fixed for actions class

= 2.1.5.1 =

* fixed migration on reset for new post_id db field

= 2.1.5 =

* default export without cron
* fixed generation of RSS feeds
* better support for Yoast XML Sitemap in additional URLs
* added option to change cron on/off
* better URL validation
* Windows support for slash URLs
* actions for custom parsers (Blocksy theme compatibility)
* enhanced matched_tags list (added srcset)
* fixed upgrader class for DB migration
* smaller CSS admin improvements
* fixed Logo saving it without font requirements
* better additional URL validation checks
* removed send debug log mail
* modified method visibility for fetch URLs task
* added complete german translations

= 2.1.4.2 =

* removed more commas for apply_filters to prevent execution error on some environments

= 2.1.4.1 =

* removed comma for apply_filters to prevent execution error on some environments

= 2.1.4 =

* new admin UI
* check for WP cron
* check for PHP XML extension
* fallback if cron not available
* CSS improvements


= 2.1.3 =

* dispatch execution to cron for larger exports
* fixed download URL for zip files
* added support for custom head tags added in wp_head hook
* parsing Rankmath sitemap if added to additional files
* removing uploads folder from additional files setting

= 2.1.2.1, February 04, 2021 =

* increased min PHP version to 7.2.5
* wp_die() if lower PHP version is available
* increases min version in diagnostics

= 2.1.2, February 04, 2021 =

* added composer support
* updated dependencies
* more fail-safe bootup
* Added sorting by status code
* removed wp_mail_content_type filter
* Fixed PHP notices for PHP 7.4 support
* new composer package for simplehtmldom with Symfony Finder
+ improved doc blocks for models and tasks
* auto exclude wp-JSON and wp-login.php from export
* trailing slash / untrailingslash check pages

= 2.1.1, December 20, 2020 =

* Fixed PHP Dom parser for later PHP versions
* removed PHP faker due to end of development
* little color modifications in admin areas
* new plugin header and readme

= 2.1.0, May 12, 2017 =

* New: Added the ability to set a user/pass for HTTP Basic Authentication

= 2.0.7, April 7, 2017 =

* Fix: Non-Latin characters should no longer get converted to HTML entities (thanks xi80r6!)

= 2.0.6, April 4, 2017 =

* Fix: Simply Static should now display a useful error message when using PHP <5.3

= 2.0.5, March 25, 2017 =

* Fix: Fix for downloading 0-byte ZIPs (no Content-Length header)

= 2.0.4, March 25, 2017 =

* Fix: Moving the default temp files directory back to within the plugin

= 2.0.3, March 16, 2017 =

* Fix: Protocol-relative URLs now work again

= 2.0.2, January 18, 2017 =

* Fix: Individual additional files are now properly included in static file generation
* New: Added a diagnostics check to ensure that WordPress can make calls to itself

= 2.0.1, January 15, 2017 =

* Fix: Removed Simply Static's new error catching; was catching errors in other plugins

= 2.0.0, January 14, 2017 =

* New: New logo/icon (thanks Hajo!)
* New: Generate static files without having to stay on the Generate page (a job runs in the background)
* New: Added the ability to specify URLs (or parts of URLs) to exclude from static file generation
* New: Added a debugging mode with the ability to create/email a debug log
* New: Added the ability to reset the plugin settings back to their defaults
* New: Future versions will be able to downgrade to 2.0.0 (by overwriting files) without errors
* New: Friendly error message if trying to use Simply Static with PHP < 5.3
* New: Added support for Accelerated Mobile Pages (AMP) HTML attributes
* Fix: URLs containing the WP URL as a query param will rewrite the param with the new URL
* Fix: Non-WP URLs in the Additional URLs section no longer cause Simply Static to hang
* Fix: Zip creation will no longer throw errors when trying to process 0-byte files
* Fix: Fixed an issue that could cause Simply Static to not remove all files when uninstalling
* Fix: Local directories are now always chmod'd to 0755 so that they're readable
* Fix: Additional errors will be caught and displayed when generating static files

= 1.8.0, November 01, 2016 =

* Fix: XML pages (e.g. /feed/) now generate index.xml files
* Fix: XML pages now replace URLs properly
* Fix: No longer adding extra backslashes (\) to directories with backslashes
* Fix: No longer adding extra slashes (/) on user-specified additional directories

= 1.7.1, October 21, 2016 =

* New: Auto-adding wp-content/uploads as a directory to include files from
* New: Usage of the mbstring PHP extension is now optional
* New: Added links for support, rating, and changelog in the footer
* Fix: Added protection for cross-site request forgery (thanks pluginvulnerabilities.com!)
* Fix: Now sanitizing all user inputs
* Fix: Locking down generation of static files to users with proper permissions
* Fix: The check for trailing slash redirection now works with relative URLs
* Fix: "Cannot redeclare class PclZip" error should no longer occur

= 1.7.0, October 06, 2016 =

* New: Destination URLs can now begin with // (in addition to HTTP:// & HTTPS://)
* New: You can now use relative URLs (instead of absolute URLs) for the static site
* New: Now able to export a static site for use offline

= 1.6.3, September 23, 2016 =

* Fix: Eliminated a security vulnerability in relation to zip downloads (thanks Bas!)
* Fix: SQL diagnostic checks now work with wildcard permission grants (thanks Jon!)

= 1.6.2, July 14, 2016 =

* Fix: Made a slight modification to the prior fix

= 1.6.1, July 14, 2016 =

* Fix: No more "Call to a member function find() on a non-object" error. Thanks, jwatkins0101!

= 1.6.0, June 07, 2016 =

* Improvement: The DomDocument PHP extension is no longer required (replaced by SimpleHtmlDomParser)
* Fix: No longer creating empty html attributes
* Fix: No longer throwing the 'Function name must be a string' error in diagnostics. Thanks, Andrew-s!

= 1.5.1, June 05, 2016 =

* Fix: Removing usage of composer, which was causing issues for certain PHP versions

= 1.5.0, June 02, 2016 =

* Fix: The img srcset attribute now displays all urls (instead of only the last one)
* Improvement: Less memory usage; less likely to exhaust allowed memory size
* Improvement: Export log is now paginated / less likely to overwhelm your browser

= 1.4.1, April 28, 2016 =

* Fix: Displaying exception messages instead of a generic error message

= 1.4.0, April 26, 2016 =

* New: French translations. Thanks Pierre!
* New: Diagnostics page displays pass/fail for everything needed for SS to run correctly
* New: Auto-adding WP's emoji url to Additional URLs
* New: If a PHP error is encountered during processing it will be displayed
* Improvement: If you can edit posts, you can generate a static site
* Fix: Bad additional URLs could cause an infinite loop during static file generation
* Fix: Unprocessable pages are now properly removed on subsequent static file runs

= 1.3.5, April 14, 2016 =

* Fix: Simply Static was sometimes throwing an error on a certain WP action

= 1.3.4, April 14, 2016 =

* Fix: URLs were not getting properly replaced

= 1.3.3, April 13, 2016 =

* Fix Attempt #3 at fixing Simply Static's upgrading process :'(

= 1.3.2, April 12, 2016 =

* Fix Attempt #2 at fixing Simply Static's upgrading process :(

= 1.3.1, April 12, 2016 =

* Fix: Attempt #1 at fixing Simply Static's upgrading process

= 1.3.0, April 9, 2016 =

* New: Static archive creation handled via AJAX; PHP timeouts are a thing of the past
* New: Activity Log - see what Simply Static is doing while it's working

= 1.2.4, March 25, 2016 =

* Fix: Link hashes (e.g. href='#section-three') will no longer be rewritten as full URLs

= 1.2.3, March 8, 2016 =

* Fix: HTTP and HTTPS on the same domain are treated as the same site (no redirect files will be created)
* New: Added support for the img tag's srcset attribute, used for responsive images

= 1.2.2, January 26, 2016 =

* Fix: Additional Files/Dirs now allows for usage of WP_PLUGIN_DIR and WP_CONTENT_DIR
* Fix: Able to use WordPress' Export feature with Simply Static installed

= 1.2.1, January 18, 2016 =

* Fix: index.html was not getting added to the static archive

= 1.2.0, January 16, 2016 =

* New: The export log now lists off all URLs, their http status codes, and the first page it was linked from
* New: You can specify additional files/directories to include in your static archive
* Fix: Switched libraries for ZIP generation, which should reduce extraction errors

= 1.1.3, December 7, 2015 =

* Fix: Able to fetch protocol-less URLs, e.g. href='//example.com/image.png'
* Fix: Static files won't be put in a subdirectory if your WP install is in a subdirectory
* Fix: Able to download ZIP regardless of whether files are on an accessible path on the server
* Fix: Escaped URLs, such as those used by WP's concatemoji, are now properly replaced with Destination URLs

= 1.1.2, October 22, 2015 =

* Fix: Now handling 302, 303, 307 HTTP codes for redirection in addition to 301
* Fix: Redirection now properly handles relative URLs

= 1.1.1, October 9, 2015 =

* Fix: No longer checking for valid SSL certificates on local requests (allows for self-signed certs to work)
* Fix: No longer creating redirect HTML pages for WP's 301 redirects from /path to /path/
* Fix: Improved URL extraction from CSS files, particularly from larger files

= 1.1.0, October 6, 2015 =

* New: Relative URLs in HTML and CSS files are now identified for static file creation
* New: 301 redirects are now identified and an HTML page is created to handle the redirection
* Fix: Repeatedly generating static files in a local directory should no longer throw errors
* Fix: System requirements issues should no longer continue to display an error for one pageview past when the error is resolved

= 1.0.2, October 4, 2015 =

* Fix: PHP 5.4 array initialization syntax caused errors in PHP <= 5.3

= 1.0.1, September 29, 2015 =

* Fix: Settings/options are now deleted upon uninstallation

= 1.0.0, September 21, 2015 =

* New: Initial release

== Upgrade Notice ==

= 1.7.1 =
This version fixes several minor security bugs. We recommend upgrading as soon as possible.

= 1.6.3 =
This version fixes a major security vulnerability. Please upgrade immediately.

simply-static's People

Contributors

adamsilverstein avatar alex01d avatar alexw23 avatar andreiglingeanu avatar andrew-s avatar andrewkahr avatar blaisco avatar dismantl avatar dmachad0 avatar freundschaft avatar gradosevic avatar ibenic avatar imjlk avatar inclushe avatar itbm avatar martijngastkemper avatar matt08 avatar nkmth avatar patrickposner avatar qmeister avatar scott-blaine-inflection 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

simply-static's Issues

Improving image extraction

We currently extracting images by attributes in a specific tag list.

All matching tags are stored in the $match_tags property here: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/class-ss-url-extractor.php#L29

This works fine in most cases and the list gets extended regularly, but we need a better solution for some use cases.

Extracting images from srcset:

We using a regex pattern to do that here: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/class-ss-url-extractor.php#L381

This does produce mixed results and may break the markup for responsive images in WordPress.

Removing query strings

A lot of themes and image optimization plugins work with query strings to dynamically output the optimized version of an image.

We should handle that and make sure to remove those strings before converting the page to HTML.
A good example is the Brizy Builder as mentioned here: #49

We should also do that within the dedicated function right here: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/class-ss-url-extractor.php#L381

Extracting image URLs encoded with base64

We currently extracting URLs from CSS as shown here: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/class-ss-url-extractor.php#L408

We should also handle base64 encoded image URLs as this seems to be quite common in a lot of themes and pagebuilders these days (Revolution Slider is also a good example here).

Converting names of files

I have a problem because I have a site that has several links and files in different languages, and the plugin are converting, making them do error 404,
Is there any parameter or configuration that I can do?

Activity Log prints errors after updating from 2.1.0 to 2.1.5.5

after updating a wordpress based website from ss 2.1.0 to ss 2.1.5.5 i get the following errors in the activity log on generating a static website:

[2022-01-20 17:52:06] Fehler: (1) Uncaught RuntimeException: Not valid HTML fragment! 
.cf7-required%3Aafter%2C.woocommerceul.productsli.productah3%3Ahover%2C.woocommerceul.productsli.productins%2C.post-titleh2%3Ahover%2C.sh-team%3Ahover.sh-team-role%2C.sh-team-style4.sh-team-role%2C.sh-team-style4.sh-team-icon%3Ahoveri%2C.sh-header-search-submit%2C.woocommerce.woocommerce-tabsli.activea%2C.woocommerce.required%2C.sh-recent-products.woocommerce.star-ratingspan%3A%3Abefore%2C.woocommerce.woocomerce-styling.star-ratingspan%3A%3Abefore%2C.woocommercediv.productp.price%2C.woocomerce-stylingli.product.amount%2C.post-format-icon%2C.sh-accent-color%2C.sh-blog-tag-item%3Ahoverh6%2Cul.page-numbersa%3Ahover%2C.sh-portfolio-single-info-itemi%2C.sh-filter-item.active%2C.sh-filter-item%3Ahover%2C.sh-nav.sh-nav-cartli.menu-item-cart.mini_cart_item.amount%2C.sh-pricing-button-style3%2C%23sidebara%3Anot%28.sh-social-widgets-item%29%3Ahover%2C.logged-in-asa%3Ahover%2C.woocommercetable.shop_table.carta%3Ahover%2C.wrap-formssup%3Abefore%2C.sh-comment-datea%3Ahov
in /var/www/html/.../wp-content/plugins/simply-static/vendor/voku/simple_html_dom/src/voku/helper/SimpleHtmlDom.php on line 176

in 2.1.0 there was no such problem (with the same website).

How to save just a part of the site to subdomain?

Hi, I would like to save part of my website to a subdomain, ie. example.com/page should become page.example.com and all subpages of page should be accessible on page.example.com/subpage... so far I just managed to copy files to the subdomain directory on server. Plugin does export all pages to directory on server destined for subdomain but there is no index file and asset links are broken. I've used General>Absolute URLs (page.example.com), delivery method "Local directory". Custom build have page and all subpages I would like to have in subdomain. I have wordpress installed in subdirectory and I use Elementor as page builder and WP Rocket for caching, if that matters.

version number style

which version number style does this package use at the moment? unfortunately it's not semver any longer, because the changes from 2.1.0 to 2.1.5.5 don't seem to be backward compatible.

SEO Press Compatibility?

I noticed that a Sitemap.xml wasn't generated when generated my site. I use SEO Press and it generates that file for me. I would prefer native support, but if not, will all of the functionality of RankMath be included if I switch everything to rankmath?

Various URLs no longer replaced after 2.1.5.8

We noticed an anomaly after this version where URLs are no longer replaced:

  • Inline script tags
  • In custom html attributes
  • Within input tag values where URLs are added via get_the_permalink()
  • In schema json/ld

In general, we are sticking with 2.1.5.8 which has the catch all. Please add the catch all at least as a fallback option or another way to cater for the new method.

Percent encoding is not working correctly

I made a post with non-english slug (with Korean)

Simply static generate a path with percent encoding, it occurs that site link's can't find proper resources
(In my case, browser can access with % encoded 1 more then exist encoded URI)
Ex> encodeURI("한글") result as %ED%95%9C%EA%B8%80 (it is also generated static path)
then browser can access with %25ED%2595%259C%25EA%25B8%2580

I think it should generate static files with decoded URI

Plugin stops changing website URL in script tags

Plugin stops change URLs to Destination URLs in JavaScript code of script tags since version 2.1.5.9. i.e.

<script type="text/javascript">
// <![CDATA[
(function (d) {
    var wf = d.createElement('script'), s = d.scripts[0];
    wf.src = 'https://hidden.domain.tld/wp-content/themes/rife-free/js/webfontloader.min.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    s.parentNode.insertBefore(wf, s);
})(document);
// ]]>
</script>

Feature: Enable advanced "fixing" of missed urls

It is nearly impossible for a static site crawler to work with all edge cases. ex. If the URL is inside javascript and the slashes are escaped, or the inline css background image url isn't being picked up correctly (what I have run into).

For this purpose I would propose two possible solutions,

  1. A Wordpress hook, after a page has been parsed but before it is written to disk so that a developer can run any code needed to clean up the page. This would also help with removing pingback link tags in the header.
  2. A place to add (in the UI) a list of strings to manually replace.

Checking for DOMDocument

User reports:

I’m running Simply Static on a system that was recently upgraded from Ubuntu Server 18.04 to Ubuntu Server 20.04. The former defaulted to PHP 7.0 and the latter defaults to PHP 7.2. After the upgrade, Simply Static stopped working. The Simply Static Diagnostics page flagged cURL as missing, which was resolved by installing php7.2-curl. After that Simply Static still wasn’t working, but the Diagnostics page didn’t flag anything. The error was “Class ‘DOMDocument’ not found”. The fix was to install php7.2-xml.

Fatal error: Uncaught TypeError: mb_check_encoding()

Stack Trace:


Fatal error: Uncaught TypeError: mb_check_encoding(): Argument #1 ($value) must be of type ?array, string given, called in /var/www/spiruwaystagging.atlr.me/wp-includes/wp-db.php on line 3006 and defined in /var/www/spiruwaystagging.atlr.me/wp-content/plugins/simply-static/vendor/symfony/polyfill-mbstring/bootstrap80.php:45 Stack trace: #0 /var/www/spiruwaystagging.atlr.me/wp-includes/wp-db.php(3006): mb_check_encoding() #1 /var/www/spiruwaystagging.atlr.me/wp-includes/wp-db.php(3117): wpdb->check_ascii() #2 /var/www/spiruwaystagging.atlr.me/wp-includes/wp-db.php(2452): wpdb->strip_invalid_text() #3 /var/www/spiruwaystagging.atlr.me/wp-includes/wp-db.php(2327): wpdb->process_fields() #4 /var/www/spiruwaystagging.atlr.me/wp-includes/option.php(487): wpdb->update() #5 /var/www/spiruwaystagging.atlr.me/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_OptionLock.php(27): update_option() #6 /var/www/spiruwaystagging.atlr.me/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(105): ActionScheduler_OptionLock->set() #7 /var/www/spiruwaystagging.atlr.me/wp-includes/class-wp-hook.php(303): ActionScheduler_QueueRunner->maybe_dispatch_async_request() #8 /var/www/spiruwaystagging.atlr.me/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #9 /var/www/spiruwaystagging.atlr.me/wp-includes/plugin.php(470): WP_Hook->do_action() #10 /var/www/spiruwaystagging.atlr.me/wp-includes/load.php(1097): do_action() #11 [internal function]: shutdown_action_hook() #12 {main} thrown in /var/www/spiruwaystagging.atlr.me/wp-content/plugins/simply-static/vendor/symfony/polyfill-mbstring/bootstrap80.php on line 45

WordPress Version: 5.8
PHP Version: 8.0.9
Plugin Version 2.1.4.2

Custom Head Tags

Custom head tags do not seem to work.
This is an example of a user:

add_action('wp_head', function() { echo '<meta name="description" content="">'."\n"; echo '<meta property="og:type" content="website">'."\n"; echo '<link rel="canonical" href="https://sample.com/>'."\n"; echo '<meta property="og:title" content=""/>'."\n"; echo '<meta property="og:description" content="">'."\n"; echo '<meta property="og:image" content="https://sample.com/images/og-image.png">'."\n"; }, 5);

Add support for decentralized storage deployment on Skynet

I work on a decentralized storage project called Skynet, which (among other things) makes deploying static websites very straightforward. We often have community members asking how to deploy WordPress sites to Skynet, and don't have a great solution.

Would you be open to a PR that added this feature?

ZIP file download link does not work

When you use the zip file export, the download link which is provided when the creation is done does not work.
It opens a blank page without downloading the file.

Builds fail on fresh install of latest Wordpress version (5.9.1)

I noticed that I was getting this error attempting to build one of our sites: Not valid HTML fragment!.wp-block-image...
I went ahead an created a fresh local instance of WordPress 5.9.1 on my local machine with only Simply Static installed from the Plugins > Add New menu.
Builds fail on this fresh install at the same exact spot.
I am running MAMP and also using this on WPEngine, which I understand are unsupported, but it looks like it's not a platform issue.

Here is the debug log:

[2022-02-23 20:05:30] [class-ss-plugin.php:261] Received request to start generating a static archive
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:61] Starting a job; no job is presently running
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:62] Here's our task list: setup, fetch_urls, create_zip_archive, wrapup
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:76] Pushing first task to queue: setup
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:105] Current task: setup
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:121] Performing task: setup
[2022-02-23 20:05:33] [class-ss-task.php:44] Status message: [setup] Setting up
[2022-02-23 20:05:33] [class-ss-setup-task.php:32] Creating archive directory: C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static/static-files/simply-static-1-1645646733\
[2022-02-23 20:05:33] [class-ss-setup-task.php:77] Adding origin URL to queue: http://localhost/fresh-install/
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:140] We've found our next task: fetch_urls
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:105] Current task: fetch_urls
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:121] Performing task: fetch_urls
[2022-02-23 20:05:33] [class-ss-fetch-urls-task.php:54] Total pages: 1; Pages remaining: 1
[2022-02-23 20:05:33] [class-ss-fetch-urls-task.php:57] URL: http://localhost/fresh-install/
[2022-02-23 20:05:33] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2022-02-23 20:05:33] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: C:\Users\ejw98\AppData\Local\Temp/6216938d4d507-uWj4wB.tmp
[2022-02-23 20:05:33] [class-ss-url-fetcher.php:89] Filesize: 54777 bytes
[2022-02-23 20:05:33] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: text/html; charset=UTF-8
[2022-02-23 20:05:33] [class-ss-url-fetcher.php:187] New filename for static page: /index.html
[2022-02-23 20:05:33] [class-ss-url-fetcher.php:127] Renaming temp file from C:\Users\ejw98\AppData\Local\Temp/6216938d4d507-uWj4wB.tmp to C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static/static-files/simply-static-1-1645646733\/index.html
[2022-02-23 20:05:33] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:327] Error: (1) Uncaught RuntimeException: Not valid HTML fragment!.wp-block-image%7Bmargin%3A001em%7D.wp-block-imageimg%7Bvertical-align%3Abottom%7D.wp-block-image%3Anot%28.is-style-rounded%29%3Ea%2C.wp-block-image%3Anot%28.is-style-rounded%29img%7Bborder-radius%3Ainherit%7D.wp-block-image.aligncenter%7Btext-align%3Acenter%7D.wp-block-image.alignfullimg%2C.wp-block-image.alignwideimg%7Bheight%3Aauto%3Bwidth%3A100%25%7D.wp-block-image.aligncenter%2C.wp-block-image.alignleft%2C.wp-block-image.alignright%7Bdisplay%3Atable%7D.wp-block-image.aligncenter%3Efigcaption%2C.wp-block-image.alignleft%3Efigcaption%2C.wp-block-image.alignright%3Efigcaption%7Bdisplay%3Atable-caption%3Bcaption-side%3Abottom%7D.wp-block-image.alignleft%7Bfloat%3Aleft%3Bmargin%3A.5em1em.5em0%7D.wp-block-image.alignright%7Bfloat%3Aright%3Bmargin%3A.5em0.5em1em%7D.wp-block-image.aligncenter%7Bmargin-left%3Aauto%3Bmargin-right%3Aauto%7D.wp-block-imagefigcaption%7Bmargin-top%3A.5em%3Bmargin-bottom%3A1em%7D.wp-block-image.is-style-circle-maskimg%2C.wp-block-image.is-style-roundedimg%7Bborder-radius%3A9999px%7D%40supports%28%28-webkit-mask-image%3Anone%29or%28mask-image%3Anone%29%29or%28-webkit-mask-image%3Anone%29%7B.wp-block-image.is-style-circle-maskimg%7B-webkit-mask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%3C%2Fcircle%3E%27%29%3Bmask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%3C%2Fcircle%3E%27%29%3Bmask-mode%3Aalpha%3B-webkit-mask-repeat%3Ano-repeat%3Bmask-repeat%3Ano-repeat%3B-webkit-mask-size%3Acontain%3Bmask-size%3Acontain%3B-webkit-mask-position%3Acenter%3Bmask-position%3Acenter%3Bborder-radius%3A0%7D%7D.wp-block-imagefigure%7Bmargin%3A0%7D.wp-block-imagefigcaption%7Bcolor%3A%23555%3Bfont-size%3A13px%3Btext-align%3Acenter%7D.is-dark-theme.wp-block-imagefigcaption%7Bcolor%3Ahsla%280%2C0%25%2C100%25%2C.65%29%7D%3C%2Fsvg%3E%3C%2Fsvg%3E.wp-block-image%7Bmargin%3A001em%7D.wp-block-imageimg%7Bvertical-align%3Abottom%7D.wp-block-image%3Anot%28.is-style-rounded%29%3Ea%2C.wp-block-image%3Anot%28.is-style-rounded%29img%7Bborder-radius%3Ainherit%7D.wp-block-image.aligncenter%7Btext-align%3Acenter%7D.wp-block-image.alignfullimg%2C.wp-block-image.alignwideimg%7Bheight%3Aauto%3Bwidth%3A100%25%7D.wp-block-image.aligncenter%2C.wp-block-image.alignleft%2C.wp-block-image.alignright%7Bdisplay%3Atable%7D.wp-block-image.aligncenter%3Efigcaption%2C.wp-block-image.alignleft%3Efigcaption%2C.wp-block-image.alignright%3Efigcaption%7Bdisplay%3Atable-caption%3Bcaption-side%3Abottom%7D.wp-block-image.alignleft%7Bfloat%3Aleft%3Bmargin%3A.5em1em.5em0%7D.wp-block-image.alignright%7Bfloat%3Aright%3Bmargin%3A.5em0.5em1em%7D.wp-block-image.aligncenter%7Bmargin-left%3Aauto%3Bmargin-right%3Aauto%7D.wp-block-imagefigcaption%7Bmargin-top%3A.5em%3Bmargin-bottom%3A1em%7D.wp-block-image.is-style-circle-maskimg%2C.wp-block-image.is-style-roundedimg%7Bborder-radius%3A9999px%7D%40supports%28%28-webkit-mask-image%3Anone%29or%28mask-image%3Anone%29%29or%28-webkit-mask-image%3Anone%29%7B.wp-block-image.is-style-circle-maskimg%7B-webkit-mask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%27%29%3Bmask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%27%29%3Bmask-mode%3Aalpha%3B-webkit-mask-repeat%3Ano-repeat%3Bmask-repeat%3Ano-repeat%3B-webkit-mask-size%3Acontain%3Bmask-size%3Acontain%3B-webkit-mask-position%3Acenter%3Bmask-position%3Acenter%3Bborder-radius%3A0%7D%7D.wp-block-imagefigure%7Bmargin%3A0%7D.wp-block-imagefigcaption%7Bcolor%3A%23555%3Bfont-size%3A13px%3Btext-align%3Acenter%7D.is-dark-theme.wp-block-imagefigcaption%7Bcolor%3Ahsla%280%2C0%25%2C100%25%2C.65%29%7D in C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\voku\simple_html_dom\src\voku\helper\SimpleHtmlDom.php:176Stack trace:#0 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\voku\simple_html_dom\src\voku\helper\AbstractSimpleHtmlDom.php(154): voku\helper\SimpleHtmlDom->replaceChildWithString('.wp-block-image...')#1 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\class-ss-url-extractor.php(289): voku\helper\AbstractSimpleHtmlDom->__set('innertext', '.wp-block-image...')#2 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\class-ss-url-extractor.php(157): Simply_Static\Url_Extractor->extract_and_replace_urls_in_html()#3 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\tasks\class-ss-fetch-urls-task.php(129): Simply_Static\Url_Extractor->extract_and_update_urls()#4 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\tasks\class-ss-fetch-urls-task.php(97): Simply_Static\Fetch_Urls_Task->handle_200_response(Object(Simply_Static\Page), true, true)#5 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\class-ss-archive-creation-job.php(122): Simply_Static\Fetch_Urls_Task->perform()#6 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\a5hleyrich\wp-background-processing\classes\wp-background-process.php(301): Simply_Static\Archive_Creation_Job->task('fetch_urls')#7 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\a5hleyrich\wp-background-processing\classes\wp-background-process.php(175): WP_Background_Process->handle()#8 C:\MAMP\htdocs\fresh-install\wp-includes\class-wp-hook.php(307): WP_Background_Process->maybe_handle('')#9 C:\MAMP\htdocs\fresh-install\wp-includes\class-wp-hook.php(331): WP_Hook->apply_filters('', Array)#10 C:\MAMP\htdocs\fresh-install\wp-includes\plugin.php(474): WP_Hook->do_action(Array)#11 C:\MAMP\htdocs\fresh-install\wp-admin\admin-ajax.php(202): do_action('wp_ajax_nopriv_...')#12 {main}  thrown in <b>C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\voku\simple_html_dom\src\voku\helper\SimpleHtmlDom.php</b> on line <b>176</b>
[2022-02-23 20:05:33] [class-ss-archive-creation-job.php:269] Status message: [error] Error: (1) Uncaught RuntimeException: Not valid HTML fragment!.wp-block-image%7Bmargin%3A001em%7D.wp-block-imageimg%7Bvertical-align%3Abottom%7D.wp-block-image%3Anot%28.is-style-rounded%29%3Ea%2C.wp-block-image%3Anot%28.is-style-rounded%29img%7Bborder-radius%3Ainherit%7D.wp-block-image.aligncenter%7Btext-align%3Acenter%7D.wp-block-image.alignfullimg%2C.wp-block-image.alignwideimg%7Bheight%3Aauto%3Bwidth%3A100%25%7D.wp-block-image.aligncenter%2C.wp-block-image.alignleft%2C.wp-block-image.alignright%7Bdisplay%3Atable%7D.wp-block-image.aligncenter%3Efigcaption%2C.wp-block-image.alignleft%3Efigcaption%2C.wp-block-image.alignright%3Efigcaption%7Bdisplay%3Atable-caption%3Bcaption-side%3Abottom%7D.wp-block-image.alignleft%7Bfloat%3Aleft%3Bmargin%3A.5em1em.5em0%7D.wp-block-image.alignright%7Bfloat%3Aright%3Bmargin%3A.5em0.5em1em%7D.wp-block-image.aligncenter%7Bmargin-left%3Aauto%3Bmargin-right%3Aauto%7D.wp-block-imagefigcaption%7Bmargin-top%3A.5em%3Bmargin-bottom%3A1em%7D.wp-block-image.is-style-circle-maskimg%2C.wp-block-image.is-style-roundedimg%7Bborder-radius%3A9999px%7D%40supports%28%28-webkit-mask-image%3Anone%29or%28mask-image%3Anone%29%29or%28-webkit-mask-image%3Anone%29%7B.wp-block-image.is-style-circle-maskimg%7B-webkit-mask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%3C%2Fcircle%3E%27%29%3Bmask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%3C%2Fcircle%3E%27%29%3Bmask-mode%3Aalpha%3B-webkit-mask-repeat%3Ano-repeat%3Bmask-repeat%3Ano-repeat%3B-webkit-mask-size%3Acontain%3Bmask-size%3Acontain%3B-webkit-mask-position%3Acenter%3Bmask-position%3Acenter%3Bborder-radius%3A0%7D%7D.wp-block-imagefigure%7Bmargin%3A0%7D.wp-block-imagefigcaption%7Bcolor%3A%23555%3Bfont-size%3A13px%3Btext-align%3Acenter%7D.is-dark-theme.wp-block-imagefigcaption%7Bcolor%3Ahsla%280%2C0%25%2C100%25%2C.65%29%7D%3C%2Fsvg%3E%3C%2Fsvg%3E.wp-block-image%7Bmargin%3A001em%7D.wp-block-imageimg%7Bvertical-align%3Abottom%7D.wp-block-image%3Anot%28.is-style-rounded%29%3Ea%2C.wp-block-image%3Anot%28.is-style-rounded%29img%7Bborder-radius%3Ainherit%7D.wp-block-image.aligncenter%7Btext-align%3Acenter%7D.wp-block-image.alignfullimg%2C.wp-block-image.alignwideimg%7Bheight%3Aauto%3Bwidth%3A100%25%7D.wp-block-image.aligncenter%2C.wp-block-image.alignleft%2C.wp-block-image.alignright%7Bdisplay%3Atable%7D.wp-block-image.aligncenter%3Efigcaption%2C.wp-block-image.alignleft%3Efigcaption%2C.wp-block-image.alignright%3Efigcaption%7Bdisplay%3Atable-caption%3Bcaption-side%3Abottom%7D.wp-block-image.alignleft%7Bfloat%3Aleft%3Bmargin%3A.5em1em.5em0%7D.wp-block-image.alignright%7Bfloat%3Aright%3Bmargin%3A.5em0.5em1em%7D.wp-block-image.aligncenter%7Bmargin-left%3Aauto%3Bmargin-right%3Aauto%7D.wp-block-imagefigcaption%7Bmargin-top%3A.5em%3Bmargin-bottom%3A1em%7D.wp-block-image.is-style-circle-maskimg%2C.wp-block-image.is-style-roundedimg%7Bborder-radius%3A9999px%7D%40supports%28%28-webkit-mask-image%3Anone%29or%28mask-image%3Anone%29%29or%28-webkit-mask-image%3Anone%29%7B.wp-block-image.is-style-circle-maskimg%7B-webkit-mask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%27%29%3Bmask-image%3Aurl%28%27data%3Aimage%2Fsvg+xml%3Butf8%2C%3Csvgviewbox%3D%2200100100%22xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccirclecx%3D%2250%22cy%3D%2250%22r%3D%2250%22%3E%27%29%3Bmask-mode%3Aalpha%3B-webkit-mask-repeat%3Ano-repeat%3Bmask-repeat%3Ano-repeat%3B-webkit-mask-size%3Acontain%3Bmask-size%3Acontain%3B-webkit-mask-position%3Acenter%3Bmask-position%3Acenter%3Bborder-radius%3A0%7D%7D.wp-block-imagefigure%7Bmargin%3A0%7D.wp-block-imagefigcaption%7Bcolor%3A%23555%3Bfont-size%3A13px%3Btext-align%3Acenter%7D.is-dark-theme.wp-block-imagefigcaption%7Bcolor%3Ahsla%280%2C0%25%2C100%25%2C.65%29%7D in C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\voku\simple_html_dom\src\voku\helper\SimpleHtmlDom.php:176Stack trace:#0 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\voku\simple_html_dom\src\voku\helper\AbstractSimpleHtmlDom.php(154): voku\helper\SimpleHtmlDom->replaceChildWithString('.wp-block-image...')#1 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\class-ss-url-extractor.php(289): voku\helper\AbstractSimpleHtmlDom->__set('innertext', '.wp-block-image...')#2 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\class-ss-url-extractor.php(157): Simply_Static\Url_Extractor->extract_and_replace_urls_in_html()#3 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\tasks\class-ss-fetch-urls-task.php(129): Simply_Static\Url_Extractor->extract_and_update_urls()#4 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\tasks\class-ss-fetch-urls-task.php(97): Simply_Static\Fetch_Urls_Task->handle_200_response(Object(Simply_Static\Page), true, true)#5 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\src\class-ss-archive-creation-job.php(122): Simply_Static\Fetch_Urls_Task->perform()#6 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\a5hleyrich\wp-background-processing\classes\wp-background-process.php(301): Simply_Static\Archive_Creation_Job->task('fetch_urls')#7 C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\a5hleyrich\wp-background-processing\classes\wp-background-process.php(175): WP_Background_Process->handle()#8 C:\MAMP\htdocs\fresh-install\wp-includes\class-wp-hook.php(307): WP_Background_Process->maybe_handle('')#9 C:\MAMP\htdocs\fresh-install\wp-includes\class-wp-hook.php(331): WP_Hook->apply_filters('', Array)#10 C:\MAMP\htdocs\fresh-install\wp-includes\plugin.php(474): WP_Hook->do_action(Array)#11 C:\MAMP\htdocs\fresh-install\wp-admin\admin-ajax.php(202): do_action('wp_ajax_nopriv_...')#12 {main}  thrown in <b>C:\MAMP\htdocs\fresh-install\wp-content\plugins\simply-static\vendor\voku\simple_html_dom\src\voku\helper\SimpleHtmlDom.php</b> on line <b>176</b>

Unable to generate static site - no errors

Recently the plugin stopped working on a site. I turned on debug mode and the only line that shows in the log is the following:

[2022-03-31 20:18:47] [class-ss-plugin.php:262] Received request to start generating a static archive

When we click on Generate Static Files, the spinner shows and then it just stops after a couple of seconds. The activity log does not change at all.

I didn't see any errors in the console either.

Plugin Version: 2.1.5.6
WordPress Version: 5.9.2

WordPress was recently updated so it might be related to that.

CSS-style gets altered

Simply Static alters this code somehow:
<div class="wp-container-6 wp-elements-480198b7852aa212b599ef4e20fb7033 wp-block-group alignfull has-background-color has-text-color has-background has-link-color" style="background-color:/#990404;padding-top:0px;padding-bottom:0px">
`

background-color:#990404;results inbackground-color:/#990404;`

An additional / gets inserted...

Not copying all images in uploads folder

Hi Patrick,

First off, let me say this is a GREAT plugin for WordPress. Saves me a tremendous amount of time!

I generate a static site into a repository that I then push to Netlify. When I generate the static site, all the images in the uploads folders are not copied over. I have to manually copy the wp-content/uploads/year/date folders over the static folder to fill in the missing images.

Just wondering if this is a bug or if there are file limits to the free version.

Thanks so much!

Google Analytics 4 not working

hi. @patrickposner thanks for creating this plugin 😃

i used google analytics 4 for tracking, and i place the tracking code using Elementor Code in head tag.
and it is not working, when i figure out the javascript code is commented and not push the tracking to GA4

can you help me for uncommented, or give hint to that commented line code ?
image

Thanks

Auto-Include and parse XML-Sitemaps

While we have an XML-Parser implemented in Simply Static here: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/class-ss-url-extractor.php#L455 the user currently needs to include the XML Sitemap manually in Simply Static -> Settings -> Include/Exclude -> Additional Files and Directories.

We should do that automatically by checking for the most popular SEO plugins and auto-include the XML-Sitemap:

  • Yoast SEO
  • RankMath SEO
  • AllInOneSEO
  • SEOPress

We also need to copy the XSLT stylesheets to ensure the XML-Sitemap can be opened within a browser without any issues.
This can be easily done by knowing where the plugins store this file (Yoast stores it at ../wordpress-seo/css/main-sitemap.xsl)

We should introduce a filter for that right here: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/tasks/class-ss-setup-task.php#L59

This way, we can introduce a new method (or methods if we need to extend that later again) and add that to the list of URLs that need to be added to the database for the fetch task.

WP crash on update on PHP version ">= 7.2.5"

"Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.5". "
WP now crashes after plugin update ( last version 2.1.2 ) on a server where PHP version is < 7.2.5
...\plugins\simply-static\vendor\composer\platform_check.php

if (!(PHP_VERSION_ID >= 70205)) {
    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
}

However in readme.txt:

=== Simply Static ===
Contributors: patrickposner
Tags: html, static website generator, static site, secure, fast
Requires at least: 5.4
Tested up to: 5.6
**Requires PHP: 5.6**
Stable tag: 2.1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Unable to create temporary directory

Hello everyone,

I have tried simply static and recently I found some issue with OceanWp theme. The problem is that, simply static can't create directory /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/... I have checked and found that /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes isn't existed.

Here is the Log:

[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-brands-400.eot
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb35cad5-q6JopS.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 136822 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: application/vnd.ms-fontobject
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-brands-400.woff2
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb35f044-T60gYd.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 78460 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: font/woff2
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-brands-400.woff
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb361401-AHR1r0.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 92136 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: font/woff
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-brands-400.ttf
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb363797-7PZZ5y.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 136516 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: font/ttf
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-task.php:44] Status message: [fetch_urls] Fetched 151 of 195 pages/files
[2021-12-11 16:02:59] [class-ss-archive-creation-job.php:145] We're not done with the fetch_urls task yet
[2021-12-11 16:02:59] [class-ss-archive-creation-job.php:105] Current task: fetch_urls
[2021-12-11 16:02:59] [class-ss-archive-creation-job.php:121] Performing task: fetch_urls
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:54] Total pages: 195; Pages remaining: 34
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-brands-400.svg
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb3675c3-HqdhO0.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 747545 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: image/svg+xml
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-regular-400.eot
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb36b2ef-luADZG.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 34350 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: application/vnd.ms-fontobject
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-regular-400.woff2
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb36dd4a-rhzUb7.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 13548 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: font/woff2
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-regular-400.woff
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb36fa50-SgI6zx.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 16772 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: font/woff
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-regular-400.ttf
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb371b60-EbH0de.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 34052 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: font/ttf
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-regular-400.svg
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb373f80-rh2opN.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 144714 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: image/svg+xml
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:130] We weren't able to establish a filename; deleting temp file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:126] Extracting URLs and replacing URLs in the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:133] Adding 0 URLs to the queue
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:144] We're saving this URL; keeping the static file
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:57] URL: http://localhost/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/fa-solid-900.eot
[2021-12-11 16:02:59] [class-ss-fetch-urls-task.php:67] URL is not being excluded
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:85] Fetching URL and saving it to: /tmp/61b4cbb3767ca-aOMMq1.tmp
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:89] Filesize: 204814 bytes
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:104] http_status_code: 200 | content_type: application/vnd.ms-fontobject
[2021-12-11 16:02:59] [class-ss-url-fetcher.php:183] Unable to create temporary directory: /var/www/html/wp-content/plugins/simply-static/static-files/simply-static-1-1639238567/wp-content/themes/oceanwp/assets/fonts/fontawesome/css/../webfonts/

File:
https://github.com/patrickposner/simply-static/blob/563f28ea74870d842733ab57c78f3dcf8b183996/src/class-ss-url-fetcher.php#L181

Moving to Action Scheduler

We are currently using WP Background Processing for managing and queuing tasks.

While this works fine right now, it seems that there isn't much maintenance going on here.
There are also a couple of issues that do affect Simply Static:

We should move to Action Scheduler to have a better maintained library + an admin UI for cancelling/restarting jobs from the backend and to use WP-CLI to handle jobs more efficiently.

Github Multiple Commits

When using the github integration, its pushing each file, one by one, causing hundreds of builds into the pipeline rather than a single commit with all files included. We pushed nearly 300 files on our site, leaving a build queue of around 24 hours on Cloudflare Pages.

Copy files instead of parse them

This could be helpful for sites with a large uploads folder.
Instead of making HTTP requests add an option to just copy the folder without parsing them.

This requires some performance tests before actual implementation.

Ensure previous static files are cleared from Local Directory before copying new files

Note: thanks for the great plugin! I discovered this issue while using your plugin and it feels like a bug, I have a PR prepared to fix it for your consideration.

Description

When using the Local Directory output option, old files are not currently removed when you perform the Generate action. Because of this files that were removed are still accessible on the static site.

Steps to reproduce

  1. Set generation to use a Local Directory.
  2. Create a new post "test-post" and generate the static site
  3. Delete the "test-post"
  4. Generate the site again

Expected result: the URL is no longer available in the static site
Actual result: the URL is still available (because it was never removed)

Recommended solution: clear the local directory folder before copying the file. Potentially this could be a UI option, however I would suggest it default to on.

Not valid HTML fragment! for essential-grid's css when generating static pages

version of Simply Static: 2.1.5.1
version of WP: 5.8.2
version of Essential Grid plugin: 3.0.13

Diagnostics:
изображение

The error when generatins css is:

[2021-11-21 08:33:15] Error: (1) Uncaught RuntimeException: Not valid HTML fragment! a.eg-henryharrison-element-1%2Ca.eg-henryharrison-element-2%7B-webkit-transition%3Aall.4slinear%3B-moz-transition%3Aall.4slinear%3B-o-transition%3Aall.4slinear%3B-ms-transition%3Aall.4slinear%3Btransition%3Aall.4slinear%7D.eg-jimmy-carter-element-11i%3Abefore%7Bmargin-left%3A0px%3Bmargin-right%3A0px%7D.eg-harding-element-17%7Bletter-spacing%3A1px%7D.eg-harding-wrapper.esg-entry-media%7Boverflow%3Ahidden%3Bbox-sizing%3Aborder-box%3B-webkit-box-sizing%3Aborder-box%3B-moz-box-sizing%3Aborder-box%3Bpadding%3A30px30px0px30px%7D.eg-harding-wrapper.esg-media-poster%7Boverflow%3Ahidden%3Bborder-radius%3A50%25%3B-webkit-border-radius%3A50%25%3B-moz-border-radius%3A50%25%7D.eg-ulysses-s-grant-wrapper.esg-entry-media%7Boverflow%3Ahidden%3Bbox-sizing%3Aborder-box%3B-webkit-box-sizing%3Aborder-box%3B-moz-box-sizing%3Aborder-box%3Bpadding%3A30px30px0px30px%7D.eg-ulysses-s-grant-wrapper.esg-media-poster%7Boverflow%3Ahidden%3Bborder-radius%3A50%25%3B-webkit-border-radius%3A in /usr/share/nginx/aikisib.ru/wp-content/plugins/simply-static/vendor/voku/simple_html_dom/src/voku/helper/SimpleHtmlDom.php on line 176

Content mentioned in the error is from the Essential Grid plugin:

# rg 'a.eg-henryharrison-element-1'
wp-content/plugins/essential-grid/includes/global-css.class.php
73:a.eg-henryharrison-element-1,

and

rg 'a.eg-henryharrison-element-2'
wp-content/plugins/essential-grid/includes/global-css.class.php
74:a.eg-henryharrison-element-2 {

meta element content attribute changes

Hi,
since the update the static site generation changes the elements in the head. e.g. meta viewport
It looks like that the last part of the URL ist prepended to the content attribute of meta elements.

Version: 2.1.5.3

before generation:
<meta name="viewport" content="width=device-width, initial-scale=1">

after generation:
<meta name="viewport" content="/exhibition/width=device-width, initial-scale=1">

Plugin stops changing website URL in metatags

Plugin stops change URLs to Destination URLs in metatags i.e.

<meta property="og:url" content="https://dev.domain.tld/slug/">
<meta property="og:image" content="https://dev.domain.tld/wp-content/uploads/image.jpg">
<meta property="og:image:secure_url" content="https://dev.domain.tld/wp-content/uploads/image.jpg">
<meta name="twitter:image" content="https://dev.domain.tld/wp-content/uploads/image.jpg">

in the latest version 2.1.5.9.
In 2.1.5.8 everything is OK.

Backslash Instaed of Forward Slash in Fetch URL Created from Additional Dir on Windows using Bitnami Wordpress Stack

While creating URLs from additional dir simply static passes the native windows directory separator (Backslash) instead of converting it to Forward Slash. This causes those URLs to return a 404 error. I am using a local deployment of WordPress by Bitnami. I was able to solve the problem by adding a string replace call in the fetch function.

class-ss-url-fetcher.php

public function fetch( Page $static_page ) {
$static_page->url = str_replace('\\', '/', $static_page->url);

Form fields

I understand a server is required to process form fields, but why does Simply Static remove the the input fields, and replace them with <\/span>? Is it possible to show the actual input forms as intended?

simply static invalid path

I want to export my WP website to GitHub pages but simply static not working I tried many things, suddenly I took a look at diagnostic page in the simply static plugin,
it says that my directory paths are invalid, I can’t find where is the problem ..
please save me – thanks!

  • Checking if Additional File/Dir C:\wamp64\www\momten-blog\wp-content\uploads is valid –> Not a valid path

  • Checking if WordPress can make requests to itself from –> Received a 301 response. This might indicate a problem
    Checking if Additional File/Dir C:\wamp64\www\momten-blog\wp-content is valid –> Not a valid path

The `Use relative URLs` option should not affect RSS feeds

As of the feed specification, an RSS feed should only contain absolute links. Otherwise, (remote) aggregators will not be able to link to the entry.

If I read correctly what happens around here this is not taken into consideration.

I'm only guessing while debugging the feed of a friend, I don't know PHP and I don't use Wordpress so I'm just trying to figure out the issue while looking at public screenshots 😅

No sitemap file in generated static site

Dear @patrickposner
Your plugin is amazing!
We are successfully able to set it with local dev on laragon (with rankmath !) and it functions like a charm! (we used composer install)
The only problem is, there is no sitemap.xml in the output dir.
Let me know how to enable sitemaps.xml in output static site.

With thanks in advance!

Localhost with subdirectory - 301 (requests to itself)

I’m using LAMPP to run my WordPress site locally on my computer. While trying to generate using Simply Static, it says an error occurred, and the diagnostics tab only has one issue: “Checking if WordPress can make requests to itself from 127.0.1.1.” The issue is a 301 error.

My guess is that it tries to access that URL, which would force-redirect via LAMPP to the dashboard page. Is there a way to make Simply Static start at a URL like http://localhost/wordpress/?

404 page isn't generated

Hello everyone,

Today I found that 404 wasn't generated by simply static. I have manually add the page URL using Additional URLs but it still doesn't get generated. So, please kindly check this bug. Thanks.

Soliloquy Sliders

I am using soliloquy slider on wordpress. When exported with simply-static only the first slider image is shown. Looking at the browser console it shows that the other slider images are missing. But rather than the filename being image.jpg it shows them as image_c.jpg - looks like soliloquy adds a "_c". Going to the original site and copying image.jpg as image_c.jpg to the static site fixes the issue. Can simply-static work with these?

Export social media images

Simply static don't export social media images from meta tag like:

<meta property="og:image" content="https://domain.tld/image.jpg" />
<meta property="og:image:secure_url" content="https://domain.tld/image.jpg" />
<meta name="twitter:image" content="https://domain.tld/image.jpg" />

JS Readfile and replace div instead of Ajax-Request

Currently using the export button triggers an ajax call with a ping. This results in a problem when exporting bigger sites due to too many ajax requests. A better way to handle that would be a new (and cleaner version) of the current debug-log.txt and using setInvertal() to fetch the content and replace the current log data.

Improving URL replacement in script tags

We are currently checking the src attribute of script tags for URL replacements, but that doesn't work if the URL is added within the script tag itself.

We currently handle that with an additional option (Simply Static -> Settings->Advanced->Additional Settings->Force URL replacement), but it should work without it as well.

Here we search and replace the URLs by checking the entire body: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/class-ss-url-extractor.php#L237

Here we are searching and replacing URLs within the src attribute of script tags: https://github.com/patrickposner/simply-static/blob/dcd0cf3714388cfd63f9ba47587dc1ea79381ae9/src/class-ss-url-extractor.php#L422

We should copy the force_replace_urls method and limit the execution to script tags.

The old method will stay in the core for compatibility reasons, but it's good to have a more robust solution just for URLs in script tags.

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.