Static WordPress Community

Custom path for static files storage location

Hi,

nice plugin, it works flawless :slight_smile:

There is one thing I’m wondering about.
Is there a way to change the path where the processed files are stored?

I found inside the file srv/ProcessedSite.php this code:

    public static function getPath() : string {
        return SiteInfo::getPath( 'uploads' ) . 'wp2static-processed-site';
    }

Right now there is no filter or option to change it. In my situation I would like to store the processed files right on the static website location. (I use the same Linux user for WP and the static version)

Thanks

1 Like

Hi @finalwebsites,

There is a new addon, contributed by a user, which I’ll be including in future releases.

I haven’t fully tested this, but you may try it out and/or remind me to release it soon :slight_smile:

If you can share a bit more about your workflow, maybe I can suggest some workaround for now…

Cheers,

Leon

Hi Leon,
thanks for the link I will test it for sure.
My current setup is:

I’m using wp.domain.com for the WordPress app where the wp2static plugin is used.

Via ServerPilot, Cleavr and other hosting panels it’s possible to create multiple sites with the same linux user name. With Cleavr it’s also possible to create pure XHTML apps. I use this one for the live website (www.domain.com).

The idea is to export the static site right into the public_html directory from the live site. So actually it works like a full page cache, with the exception that WordPress and the static site are separated.

I let you know how it works, most of all what “happens” if I change posts :slight_smile:

@leonstafford the plugin file from you link has some issue with the names of the controller it has to be “WP2StaticDirectoryDeployer” instead of “WP2StaticCopy”.

:frowning: the option page doesn’t work.
First I fixed the path inside the controller file to get the options page.
The table/form doesn’t have any labels and the save button ends up in a white screen.

I fixed another names in the options page with the result that I get the full options table. After that the path is also saved. If I hit the generate button I see this message between the other logs:

2021-09-24 14:33:00: You must specify the target folder in WP2Static > Addons > Directory Deployment > Configure

So it looks like that this option value is not read…

Sorry for the delayed reply, thanks for looking, @finalwebsites. I’ll need to finish off that new addon to get it working smoothly. No ETA as yet