elementor / wp2static

WordPress static site generator for security, performance and cost benefits
https://wp2static.com
The Unlicense
1.43k stars 270 forks source link

static home page looks different from the original WP #310

Closed jalbstmeijer closed 5 years ago

jalbstmeijer commented 5 years ago

Hi,

Just testing wp2static 6.6.2 on a freshly installed wp-5.0.3, using the "Subdirectory on same server" output option. I expected the static home page to look the same as the original from WP.

But I seem to get "page" content on the static home where I do not get that on the original WP output.

I'm I missing something?

Gr, J

static_output original

leonstafford commented 5 years ago

Hi @jalbstmeijer, it does seem to be a new bug affecting a few people. Not sure yet whether it's down to a particular theme, permalinks setting or plugin.

Could you please run this latest build, with Debug Mode enabled (Advanced tab) and email me through the results: leon@wp2static.com test_fix_404_homepage.zip

jalbstmeijer commented 5 years ago

Hi Leon, test_fix_404_homepage.zip is not producing any static output for me. So I mailed a log of est_fix_404_homepage.zip and 6.6.2. Gr, J

jalbstmeijer commented 5 years ago

"Not sure yet whether it's down to a particular theme, permalinks setting or plugin"

Just to be clear, I'm testing against a fresh WP 5.0.3 install. Only actions taken are wp2static plugin install and config.

leonstafford commented 5 years ago

@jalbstmeijer few things that may help from your logs:

Could you please try at least the Permalinks and send me another log?

leonstafford commented 5 years ago

Comparison of environments users are experiencing this issue:

PHP WP URL Desintation URL OS Permalinks WP
5.6.4 http://domain.local http://domain.local/subdir/ AMZ Linux none 5.0.3
7.2.10 http://ipaddress https://domain.tld/ buntu 18.04 /%postname%/ 5.0.3
leonstafford commented 5 years ago

I'm going to test against a few more environments now to reproduce

leonstafford commented 5 years ago

tested against vultr WP app instance:

success message, but no zip

archive dir empty, errors in php-fpm logs:

[08-Feb-2019 15:59:33 UTC] PHP Warning: rename(/var/www/html/wp-content/uploads/wp-static-html-output-1549641571.tmp,/var/www/html/wp-content/uploads/wp-static-html-output-1549641571.zip): No such file or directory in /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/ArchiveProcessor.php on line 269

running again with Debug Mode enabled:

leonstafford commented 5 years ago

logs not containing any lines of file saving:

2019-02-08 04:05:33
PHP VERSION 7.0.32-0ubuntu0.16.04.1
OS VERSION Linux test7dev.wp2static.com 4.4.0-137-generic #163-Ubuntu SMP Mon Sep 24 13:14:43 UTC 2018 x86_64
WP VERSION 5.0.3
WP URL http://test7dev.wp2static.com
WP SITEURL http://test7dev.wp2static.com
WP HOME http://test7dev.wp2static.com
WP ADDRESS http://test7dev.wp2static.com
PLUGIN VERSION 7-dev
VIA WP-CLI? 
STATIC EXPORT URL http://test7dev.wp2static.com/mystaticsite/
PERMALINK STRUCTURE /%year%/%monthnum%/%day%/%postname%/
SERVER SOFTWARE nginx/1.14.0
Active plugins:
static-html-output-plugin/wp2static.php
Plugin options:
additionalUrls: 
allowOfflineUsage: 
baseHREF: 
baseUrl: http://test7dev.wp2static.com/mystaticsite
baseUrl-bitbucket: 
baseUrl-bunnycdn: 
baseUrl-folder: http://test7dev.wp2static.com/mystaticsite
baseUrl-ftp: 
baseUrl-github: 
baseUrl-gitlab: 
baseUrl-netlify: 
baseUrl-s3: 
baseUrl-zip: https://test7devstatic.netlify.com
baseUrl-zip: https://test7devstatic.netlify.com
basicAuthPassword: *******************
basicAuthUser: 
bbBranch: 
bbPath: 
bbRepo: 
bbToken: *******************
bunnycdnStorageZoneAccessKey: *******************
bunnycdnPullZoneAccessKey: *******************
bunnycdnPullZoneID: 
bunnycdnStorageZoneName: 
bunnycdnRemotePath: 
cfDistributionId: 
completionEmail: 
crawl_delay: 0
crawl_increment: 999999
crawlPort: 
debug_mode: 1
detection_level: everything
delayBetweenAPICalls: 0
deployBatchSize: 1
excludeURLs: 
ftpPassword: *******************
ftpRemotePath: 
ftpServer: 
ftpPort: 
ftpTLS: 
ftpUsername: 
ghBranch: 
ghCommitMessage: 
ghPath: 
ghRepo: 
ghToken: *******************
glBranch: 
glPath: 
glProject: 
glToken: *******************
netlifyHeaders: 
netlifyPersonalAccessToken: *******************
netlifyRedirects: 
netlifySiteID: 
removeConditionalHeadComments: 1
removeHTMLComments: 1
removeWPLinks: 1
removeWPMeta: 1
rewrite_rules: 
rename_rules: 
s3Bucket: 
s3Key: 
s3Region: 
s3RemotePath: 
s3Secret: *******************
selected_deployment_option: folder
targetFolder: /var/www/html/mystaticsite
useActiveFTP: 
useBaseHref: 
useBasicAuth: 
useRelativeURLs: 
Installed extensions:
Core
date
libxml
openssl
pcre
zlib
filter
hash
Reflection
SPL
session
standard
cgi-fcgi
mysqlnd
PDO
xml
bcmath
bz2
calendar
ctype
curl
dom
mbstring
fileinfo
ftp
gd
gettext
gmp
iconv
igbinary
imagick
json
exif
mcrypt
mysqli
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
shmop
SimpleXML
sockets
sqlite3
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xmlreader
xmlrpc
xmlwriter
xsl
zip
Zend OPcache
Exclusion rules wp-json
Crawling /
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /2019/
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /2019/02/
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /2019/02/08/
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /2019/02/08/hello-world/
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /2019/02/08/hello-world/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /wp-json/oembed/1.0/embed
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /author/admin/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /category/uncategorized/
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /category/uncategorized/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /category/uncategorized/page/1
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /category/uncategorized/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /favicon.ico
BAD RESPONSE STATUS (404): /favicon.ico
Memory allocated by crawl script: 2048
Crawling /page/1
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /pages/page/1
BAD RESPONSE STATUS (404): /pages/page/1
Memory allocated by crawl script: 2048
Crawling /robots.txt
BAD RESPONSE STATUS (404): /robots.txt
Memory allocated by crawl script: 2048
Crawling /sample-page/
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /sample-page/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /sample-page/
Adding discovered URL: /wp-json/oembed/1.0/embed
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /wp-admin/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /sitemap.xml
BAD RESPONSE STATUS (404): /sitemap.xml
Memory allocated by crawl script: 2048
Crawling /wp-content/themes/twentyseventeen/assets/css/colors-dark.css
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/css/editor-style.css
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/css/ie8.css
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/css/ie9.css
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/images/coffee.jpg
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/images/espresso.jpg
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/images/header.jpg
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/images/sandwich.jpg
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/images/svg-icons.svg
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/js/customize-controls.js
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/js/customize-preview.js
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/js/global.js
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/js/html5.js
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/js/navigation.js
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/rtl.css
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/screenshot.png
Memory allocated by crawl script: 4096
Crawling /wp-content/themes/twentyseventeen/style.css
Memory allocated by crawl script: 6144
Exclusion rules wp-json
Crawling /2019/02/08/hello-world/feed/
Memory allocated by crawl script: 2048
Crawling /author/admin/
Adding discovered URL: /
Adding discovered URL: /feed/
Adding discovered URL: /comments/feed/
Adding discovered URL: /author/admin/feed/
Adding discovered URL: /wp-includes/css/dist/block-library/style.min.css
Adding discovered URL: /wp-content/themes/twentyseventeen/style.css
Adding discovered URL: /wp-includes/js/jquery/jquery.js
Adding discovered URL: /wp-includes/js/jquery/jquery-migrate.min.js
Adding discovered URL: /wp-json/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/images/header.jpg
Adding discovered URL: /2019/02/08/hello-world/
Adding discovered URL: /2019/02/
Adding discovered URL: /category/uncategorized/
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/skip-link-focus-fix.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/global.js
Adding discovered URL: /wp-content/themes/twentyseventeen/assets/js/jquery.scrollTo.js
Memory allocated by crawl script: 2048
Crawling /category/uncategorized/feed/
Memory allocated by crawl script: 2048
Crawling /comments/feed/
Memory allocated by crawl script: 2048
Crawling /feed/
Memory allocated by crawl script: 2048
Crawling /sample-page/feed/
Memory allocated by crawl script: 2048
Crawling /wp-admin/
BAD RESPONSE STATUS (401): /wp-admin/
Memory allocated by crawl script: 2048
Crawling /wp-includes/css/dist/block-library/style.min.css
Memory allocated by crawl script: 4096
Crawling /wp-includes/js/jquery/jquery-migrate.min.js
Memory allocated by crawl script: 4096
Crawling /wp-includes/js/jquery/jquery.js
Memory allocated by crawl script: 4096
Excluding /wp-json/ because of rule wp-json
Excluding /wp-json/oembed/1.0/embed because of rule wp-json
leonstafford commented 5 years ago

@jalbstmeijer please try the latest attached fix_not_saving.zip

jalbstmeijer commented 5 years ago

PHP WP URL Desintation URL OS Permalinks WP 5.6.4 http://domain.local http://domain.local/subdir/ AMZ Linux none 5.0.3

with permalinks /%postname%/ enabled I get the expected output (it is php 5.6.40 btw)

jalbstmeijer commented 5 years ago

@jalbstmeijer please try the latest attached fix_not_saving.zip

I now get static output with this dev version. To be honest I never noticed the "You need to set your WordPress Pemalinks" message before. So I think that was my problem. Maybe just not only mention this need, but also disable the "Start static site export" button in case no permalink is set?

leonstafford commented 5 years ago

Hi @jalbstmeijer - yes, very poor UX, used to have a bit more blocking there, planning an overhaul of such issues.

It may still not have worked for you with permalinks due to this other issue, but glad it's outputting for you now!

Please feel free to email/open GH issue for any other issue you're encountering.

Oh, did this sort the homepage showing a static WP page for you?

jalbstmeijer commented 5 years ago

No, in my case it was 100% the permalink not being configured.

php-5.6.40 + wp-5.0.3 + wp2static-6.6.2 generates now the correct output

But happy I could help debug the dev not creating output bug

leonstafford commented 5 years ago

Ok, great to hear!

I was thinking to change the minimum supported PHP version to 7.2 in the next release, but I'll instead just make that an encouragement within the plugin. Users wanting to migrate old WordPress sites without worrying about server upgrades will then not be discouraged. Removing the heavy AWS SDK and other libraries in recent releases should make dependencies very low now... curious to see how far back version of WordPress and PHP we can go (have heard of WP 3.x still using an older version of the plugin recently...)

Anyway, glad the plugin is working for you!

If you have time, please leave a review here: https://wordpress.org/support/plugin/static-html-output-plugin/reviews/