You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When WP is installed in a subfolder, however deep, the count of folders cannot be found just from parse_url. The site could be multisite, with its different structure, or the content folder could be moved.
Especially on localhost, the WP folder could be several folders deep.
A better method would be to get the difference between the home URL and the content URL(shows if content is in subfolder), or between home URL and site URL (shows if WP is in subfolder).
Using parse_url on localhost returns the subfolder as part of the path, so generating crawling URLs is incorrect. My home URL is set to http://localhost/testsite and the crawl list has /testsite/2020/05/05/ whereas the other paths do not start with testsite .
This is after I changed the parse_url call in FilesHelper.php (in getAllWPPostURLs).
Generating a site, I end up with posts at the top level, but duplicated under a testsite folder.
The text was updated successfully, but these errors were encountered:
https://github.com/leonstafford/static-html-output/blob/10cf1af363a07c90d1bec426f7db99f40cadfff9/src/WPSite.php#L327
When WP is installed in a subfolder, however deep, the count of folders cannot be found just from
parse_url
. The site could be multisite, with its different structure, or the content folder could be moved.Especially on localhost, the WP folder could be several folders deep.
A better method would be to get the difference between the home URL and the content URL(shows if content is in subfolder), or between home URL and site URL (shows if WP is in subfolder).
Using
parse_url
on localhost returns the subfolder as part of the path, so generating crawling URLs is incorrect. My home URL is set tohttp://localhost/testsite
and the crawl list has/testsite/2020/05/05/
whereas the other paths do not start withtestsite
.This is after I changed the
parse_url
call in FilesHelper.php (in getAllWPPostURLs).Generating a site, I end up with posts at the top level, but duplicated under a
testsite
folder.The text was updated successfully, but these errors were encountered: