Title: Make generated CA certificate path configurable
Last modified: July 2, 2026

---

# Make generated CA certificate path configurable

 *  Resolved [MorgunovVit](https://wordpress.org/support/users/morgunovvit/)
 * (@morgunovvit)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/make-generated-ca-certificate-path-configurable/)
 * Hi WPSOLR team,
 * We are using WPSOLR with OpenSearch over HTTPS and a self-signed/private CA certificate
   configured in the index_cert_1 field.
 * We found that WPSOLR currently generates the CA certificate file path from get_home_path():
 *     ```wp-block-code
       $file = sprintf('%swpsolr_index_%s_node_cert.pem', get_home_path(), $index_label);
       ```
   
 * In our deployment, WordPress core is installed in a subdirectory and the project
   is deployed in containers. In this setup get_home_path() can resolve to /, so
   WPSOLR tries to read/write: /wpsolr_index_wp_index_node_cert.pem
 * This causes permission errors because the PHP-FPM user cannot write to the filesystem
   root:
 *     ```wp-block-code
       file_get_contents(/wpsolr_index_wp_index_node_cert.pem): Failed to open stream: No such file or directoryfile_put_contents(/wpsolr_index_wp_index_node_cert.pem): Failed to open stream: Permission denied
       ```
   
 * As a result, OpenSearch connection fails and search pages can break with:
 * No alive nodes found in your cluster
 * Could you please consider making this generated certificate path configurable?
 * Ideally, we would like one or more of these options:
    1. A WordPress constant, for example: define(‘WPSOLR_CERT_DIR’, ‘/var/log/wp-logs/
       wpsolr’);
    2. A plugin setting where admins can define the directory/path for generated .pem
       files.
    3. At minimum, a filter hook around the generated path, for example: $file = apply_filters(
       ‘
       wpsolr_self_cacert_file’,sprintf(‘%swpsolr_index_%s_node_cert.pem’, get_home_path(),
       $index_label),$index_label);
 * This would let containerized or read-only deployments store the generated certificate
   in a writable private directory outside the web root. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Patrice](https://wordpress.org/support/users/eostis/)
 * (@eostis)
 * [1 week, 4 days ago](https://wordpress.org/support/topic/make-generated-ca-certificate-path-configurable/#post-18954309)
 * Hi,
 * Yes, that makes sense.
 * I will implement **a plugin setting where admins can define the directory/path
   for generated `.pem` files** in the next release so the storage location becomes
   fully configurable.
 *  Plugin Support [Patrice](https://wordpress.org/support/users/eostis/)
 * (@eostis)
 * [5 days, 5 hours ago](https://wordpress.org/support/topic/make-generated-ca-certificate-path-configurable/#post-18959998)
 * Hi,
 * This is available in version 24.5, which was just released.
 * The plugin now allows administrators to define the directory/path used for generated`.
   pem` files, making the storage location fully configurable.
 * Please let me know if you have any questions.
 *  Thread Starter [MorgunovVit](https://wordpress.org/support/users/morgunovvit/)
 * (@morgunovvit)
 * [4 days, 17 hours ago](https://wordpress.org/support/topic/make-generated-ca-certificate-path-configurable/#post-18960408)
 * Thanks a lot!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmake-generated-ca-certificate-path-configurable%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wpsolr-free/assets/icon-256x256.png?rev=3531259)
 * [WPSOLR — Bringing Enterprise Search to Everyone](https://wordpress.org/plugins/wpsolr-free/)
 * [Support Threads](https://wordpress.org/support/plugin/wpsolr-free/)
 * [Active Topics](https://wordpress.org/support/plugin/wpsolr-free/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpsolr-free/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpsolr-free/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [MorgunovVit](https://wordpress.org/support/users/morgunovvit/)
 * Last activity: [4 days, 17 hours ago](https://wordpress.org/support/topic/make-generated-ca-certificate-path-configurable/#post-18960408)
 * Status: resolved