Closed TheAutisticTechie closed 4 years ago
Apologies i was on wordpress version. The lastest version from here gives the below:
PHP Warning: fopen(/var/www/html/wp-content/uploads/WP2STATIC-FILES-TO-DEPLOY.txt): failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/static-html-output-plugin/src/SitePublisher.php on line 268
Thanks for reporting @dltmurphy - luckily, we should have a new release going out to wordpress.org soon.
I should have been running my local WP on latest upcoming release, but was still on 5.4.1.
The latest changes I'm working on do away with those WP2STATIC*
files in the uploads dir, so those issues may be removed when latest development branch is merged in, but I'll leave this issue open until sure.
Ah yes I saw you was working on using a database instead! Sounds much more efficient than the current method. Do you know roughly which week it'll be released?
Not sure (my go to response is https://wp2static.com/roadmap/), but I feel the hardest parts were cleared last night and I should be able to clear the 3 remaining open tasks on https://wp2static.com/roadmap/ tonight.
Will need to also check how things are looking from the WP_CLI commands side and test it out on a few real world sites. I'm itching to get my focus back to V7 development (https://github.com/WP2Static/wp2static), so the sooner I clear this the better.
@dltmurphy could you please try this build and see if you get any of the same issues? https://github.com/WP2Static/static-html-output-plugin/releases/tag/6.6.19
I'm n ot seeing an error on the command line now however it doesn't work. It generates in just over 15 minutes and the deployment says it's instant to Github Pages
sudo -u www-data -i -- wp statichtmloutput deploy --path='/var/w
ww/html'
Deploying static site
Deployed to: github in 00:00:00
When i do it from the UI it says successfully deployed but the export log shows the below for all URLs:
2020-06-15 21:07:03 cURL error:Failed to connect to dev.local port 443: Connection timed out
2020-06-15 21:07:03 BAD RESPONSE STATUS (0): /
@dltmurphy probably DeployCache from previous deploy - try Advanced Tab - Delete Deploy Cache, then it should take its time
sorry, the 443 issue - do you have HTTP basic authentication on the site? Is that input in the plugin's Crawl tab?
Okay I've just deleted the cache and set the deployment going again from the UI
No i don't have basic authentication enabled. The crawl log lists all my URLs (i think) and say the below:
Pending / Note: initial_crawl_list
Pending /2020/ Note: initial_crawl_list
Pending /2020/06/ Note: initial_crawl_list
Pending /2020/06/03/ Note: initial_crawl_list
Pending /about/ Note: initial_crawl_list
@dltmurphy if you refresh that log, have any changed to 200/400/other status?
If not, there's definitely something blocking the crawling....
in your Mac's /etc/hosts
file do you have an entry for dev.local
in there? (there should be one, unless MAMP is routing things in some other way or .local
should be treated special, anyway and know it's a local address.
None changed, they are all saying pending still.
Yeah i have my hosts file set and it loads the website up correctly. I have a redirect to https within apache
If it helps, I'm using Windows 10 with the Windows Subsystem for Linux 2 running Ubuntu. Apache2, MariaDB and PHP 7.4. Wordpress 5.4.2 and letsencrypt for my SSL.
OK, I'd bet on the TLS/https setup. As it's on your local computer, I'd recommend turning it off, as little need, unless you're serving to other computers on your network/remotely from your machine.
Whilst the plugin should work with self-signed local certificates, it's going to be more pain than it's worth.
That was it. All issues resolved :)
I have lost the ability to publish into a sub directory though in the new version, is this on purpose?
@dltmurphy w00t! Glad that is sorted! I think there was some progress at some point to make it easier on local https, but I'll leave it down the priorities as shouldn't block anyone to disable it.
re subdir publishing, see: https://github.com/WP2Static/static-html-output-plugin/issues/96
it will still be available in a subdirectory, if you want to pipe it into other processes by using the ZIP deploy. the UI will show the folder location (still needs an update) but will be the same as zip, without the .zip
Sorry I meant a subdirectory on github deployment. I need to publish into the "public" folder within the github repo
ah, that.
whilst subdir for export URL should be supported (see some chat here: https://github.com/WP2Static/wp2static/issues/573)
I'm not sure about that for this version, as it's extra complexity when there's still a lot of work to get core functions working.
which kind of deploy are you doing for GitHub? ie, org or personal or project repo? hosting with your own domain or as a something.github.io?
I think you can still choose to use master
, gh-pages
branches or the public
dir.
If the public dir is a must, it may be better to do Zip deploy and local git client (to commit to the public
dir, this will also be faster than this Static HTML Output's GitHub deploy, which does 1 commit per file, which works, but isn't great).
In WP2Static, there's a new GitHub Add-on, which @bookwyrm is working on here: https://github.com/Red-Madrone-Solutions/wp2s-addon-github that may have/get options for the subdir vs branch static site deployment option when ready.
You may also be able to use a custom hook to move the files after export, such as this: https://github.com/WP2Static/static-html-output-plugin/issues/96#issuecomment-644523577
I'm not sure about that for this version
meaning deployment subdirectory option
Warning: feof() expects parameter 1 to be resource, bool given in /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SitePublisher.php on line 2
PHP Warning: fgets() expects parameter 1 to be resource, bool given in /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SitePublisher.php on line 2
Generating appears to work, though slower than usual