Download the PHP package wierk/envpress without Composer

On this page you can find all versions of the php package wierk/envpress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package envpress

EnvPress

A PHP package streamlining the configuration of modern and secure WordPress instances using a standard set of environment variables.

Key Features

Motivation

The standard setup of WordPress involves maintaining a wp-config.php file for setting basic configuration options, such as paths, the database connection, and security salts. Except for the actual configuration values, the source code of this file is repeated for each instance with little to no variation. Other common configurations, such as SMTP server credentials and disabling XML-RPC, must be handled separately, far away from wp-config.php, in a custom (child) theme or using multiple third-party plugins.

This package is designed to simplify the configuration process and lessen the maintenance workload for the majority of WordPress instances. It relies on a standard set of environment variables (see list below), rather than boilerplate PHP code, to configure an instance.

Getting Started

  1. Setup Composer based WordPress project:

    The easiest way to do so, is creating a new Bedrock project using Composer:

  2. Install this package via Composer:

  3. Set up environment variables:

    Configure environment variables in the web server or PHP config (recommended for production) or, alternatively, add them to a file named .env in the root of the project (common for development).

    Minimal set of environment variables to run a WordPress instance:

    Set of env vars providing WordPress salts:

  4. Replace the content of wp-config.php with the following:

    Starting from the Bedrock boilerplate, the root config directory may now be removed.

Environment Variables

EnvPress sets up a WordPress instance using a collection of environment variables, listed in the following table. In cases where an environment variable is absent, the corresponding default value is used. These default values are selected to closely resemble a standard, unmodified WordPress installation to avoid unintentional changes. Env vars prefixed APP_ are explicitly reserved for the underlying application and will never be used by this package.

Environment variable Comments Default
WP_HOME URL the WordPress instance can be reached at Required
WP_SITEURL URL where WordPress core files reside Required
WP_ENVIRONMENT_TYPE Environment type production
WP_DEBUG Flag to enable the reporting of some errors or warnings false
WP_CACHE Flag to enable advanced-cache.php false
WP_CRON Flag to enable WP Cron based on page load true
WP_FILE_MODS Flag to enable plugin and theme installation/update true
WP_DEFAULT_THEME Default WordPress theme name WordPress default
WP_POST_REVISIONS Number of post revisions (-1, 0, 1, 2, …) -1
WP_ALLOW_REPAIR Flag to enable automatic database repair support false
WP_ROLES_PATCH JSON-encoded set of role and capability changes No changes
MULTISITE_ALLOW Flag to allow a multisite network false
MULTISITE_ENABLE Flag to enable a multisite network, once installed false
MULTISITE_TYPE Either subdomains or subdirectories subdirectories
MULTISITE_DOMAIN Value of DOMAIN_CURRENT_SITE Required for MS
MULTISITE_PATH Value of PATH_CURRENT_SITE Required for MS
DATABASE_URL MySQL server URL (see below) Required
DATABASE_CHARSET Database character set utf8mb4
DATABASE_COLLATE Database collation Empty
DATABASE_PREFIX Database table prefix wp_
MAILER_FROM_ADDRESS Sender email address (may be set in MAILER_URL) WordPress default
MAILER_FROM_NAME Sender name WordPress default
MAILER_URL SMTP server URL for outgoing mail (see below) WordPress default
FEATURE_COMMENTS Enable comments and related features true
FEATURE_EMOJI Enable support for emojis in older browsers true
FEATURE_OEMBED Enable oEmbed and related features true
FEATURE_XMLRPC Enable XML-RPC (incl. pingbacks) true
SALT_AUTH_KEY Cryptographically strong and random key put your uni…
SALT_SECURE_AUTH_KEY Cryptographically strong and random key put your uni…
SALT_LOGGED_IN_KEY Cryptographically strong and random key put your uni…
SALT_NONCE_KEY Cryptographically strong and random key put your uni…
SALT_AUTH_SALT Cryptographically strong and random key put your uni…
SALT_SECURE_AUTH_SALT Cryptographically strong and random key put your uni…
SALT_LOGGED_IN_SALT Cryptographically strong and random key put your uni…
SALT_NONCE_SALT Cryptographically strong and random key put your uni…
ADMIN_SUPPORT_NAME Support contact name Empty
ADMIN_SUPPORT_URL Support contact website URL Empty
ADMIN_DASHBOARD_DISABLE CSV of dashboard widget ids to be disabled Empty
ADMIN_DISPLAY_ENV Flag to display the environment type in admin false
TRACKING_FATHOM Fathom Analytics Site id Empty
TRACKING_GTM Google Tag Manager Container id Empty
PLUGIN_ACF_PRO_LICENSE License key for ACF PRO Empty (disabled)
RELEASE_VERSION Display version of the release Empty
RELEASE_URL Website URL of the release Empty
ENVPRESS_TRUSTED_PROXIES CSV of trusted proxy addresses Empty (disabled)

Connect Backing Services via URLs

Backing services such as databases, caching systems, or SMTP servers are attached using URLs. These URLs consolidate all the essential connection details, like host name, port, access credentials, and other relevant parameters, into a singular, manageable string.

In URLs, if a user name or password contains special characters ($&+,/:;=?@), they must be URL encoded.

Database URL/DSN

Query parameters:

Mailer URL

Query parameters:

Patching Roles and Capabilities

The WP_ROLES_PATCH environment variable allows role and capability changes to be defined using a JSON-encoded structure. Each top-level key is a role name, and each value describes changes for that role. Patches are applied only once per unique configuration using an internal hash.

Supported role object attributes:

Example:

This adds the capabilities create_users and list_users to the editor role, removes delete_users, and deletes the unused role.

Credits

Created and maintained by Wierk and contributors. Released under the MIT license.


All versions of envpress with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1.0
vlucas/phpdotenv Version ^5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wierk/envpress contains the following files

Loading the files please wait ....