Update WordPress automatically but without touching wp-content • WordPress Help

From the WordPress 3.2 version you already know that you can update WordPress automatically quickly and easily but ah friend! What if you have made modifications to some default theme or plugins? that may also be updated and you would lose all the changes.

That, but you can avoid this undesired side effect, since there is a constant that you can add to your WordPress configuration file the famous wp-config.php with which prevent WordPress kernel updates from affecting (touching) other folders . Come on, that will only update the WordPress kernel, nothing more .

Just add this line to your configuration file and save the changes:

WordPress Constants – Complete list and description

In the " back room " of WordPress you do not have an entry field for every possible modification. Only some are available through an action or filter, and for some changes you will have to define or change a PHP constant .

In this article, for you to have a query tool, you have the [19659004] list of all native WordPress constants not including obsolete constants.

A constant is an identifier (name) for a simple value. As the name suggests, that value can not change during the execution of a script. A constant, by default, is case-sensitive, and by convention the identifiers are always uppercase ( PHP docs ).

General

  • AUTOSAVE_INTERVAL # [19659009] Defines a range in which WordPress should auto-save.
    Value: time in seconds (Default: 60 )
  • CORE_UPGRADE_SKIP_NEW_BUNDLED #
    It allows you to skip new files in packages as in plugins and / or themes in updates.
    Values: true | false
  • DISABLE_WP_CRON # [19659009] Disables the WordPress cron function.
    Value: true
  • EMPTY_TRASH_DAYS #
    Controls the number of days before WordPress permanently deletes entries, pages, attachments, and comments from the recycling bin.
    Value: t Time in days (Default: 30 )
  • IMAGE_EDIT_OVERWRITE #
    Allows WordPress to overwrite an image before editing or saving the image as a copy.
    Values: true | false
  • MEDIA_TRASH #
    Activate / Deactivate the recycle bin function for the media.
    Values: true | false (Default: false )
  • WPLANG #
    Defines the language in which WordPress will be used.
    Values: For Spanish en_US
  • WP_DEFAULT_THEME #
    Defines the default theme for new sites, it also serves as backup in case of failure of the active theme.
    Value: [19659018] theme name (Default: twentyeleven )
  • WP_CRON_LOCK_TIMEOUT #
    Defi ne a period of time in which a single "cronjob" will be completed. From WordPress 3.3 .
    Value: time in seconds (Default: 60 )
  • WP_MAIL_INTERVAL #
    Defines a period of time in which a single email request can be made.
    Value: time in seconds (Default: 300 )
  • WP_POST_REVISIONS #
    Enables / disables the entry review function. A number greater than 0 defines the number of revisions for entries.
    Values: true | false | number (Default: true )
  • WP_MAX_MEMORY_LIMIT #
    Allows you to change the maximum memory limit for some WordPress functions.
    Values: See in PHP docs (By default : 256M )
  • WP_MEMORY_LIMIT #
    Defines the memory limit for WordPress.
    Values: See in PHP docs (Default: 32M for Multisite 64M )

State

  • APP_REQUEST #
    Defined if there is a request for the publication protocol Atom .
    Value: true
  • COMMENTS_TEMPLATE #
    Defined if the comment template is loaded.
    Value: true
  • DOING_AJAX #
    Defined if there is a request AJAX .
    Value: true
  • DOING_AUTOSAVE #
    Defined if WordPress is autoguarding entries.
    Value: true
  • DOING_CRON #
    Defined if WordPress is performing a cronjob.
    Value: true
  • IFRAME_REQUEST #
    Defined if there is a request inlineframe .
    Value: true
  • IS_PROFILE_PAGE #
    Defined if the user changes the settings of his profile.
    Value: true
  • SHORTINIT #
    Can be set to load only the half of WordPress.
    Value: true
  • WP_ADMIN #
    Defined if there is a request on the WordPress desktop. [194] 59029] Value: true
  • WP_BLOG_ADMIN #
    Defined if there is a request in / wp-admin / .
    Value: true
  • WP_IMPORTING #
    Defined if WordPress is importing data.
    Value: true
  • WP_INSTALLING #
    Defined in new installations or updates.
    Value: true
  • #WP_INSTALLING_NETWORK #
    It is defined if there is a request in the administration or installation of the network. From WordPress 3.3 before it was WP_NETWORK_ADMIN_PAGE .
    Value: true
  • WP_LOAD_IMPORTERS #
    Defined if you visit the Importer ( Tools → Import).
    Value: true
  • WP_NETWORK_ADMIN #
    Defined if there is a request in / wp-admin / network / .
    Value: true
  • WP_REPAIRING #
    Defined if there is a request in /wp-admin/maint/repair.php .
    Value : true
  • WP_SETUP_CONFIG #
    Defined if WordPress will be installed or configured.
    Value: true
  • WP_UNINSTALL_PLUGIN #
    Defined if a plugin is to be uninstalled (for uninstall.php ).
    Value: true
  • WP_USER_ADMIN #
    Defi ne if there is a request in / wp-admin / user / .
    Value: true
  • XMLRPC_REQUEST #
    Defined if there is a request in the API XML-RPC .
    Value: true

Routes, directories and links

  • ABSPATH #
    Absolute path to the root directory of WordPress .
    Default: path to wp-load.php
  • WPINC #
    Path relative to / wp-includes / . You can not change this.
    Default: wp-includes
  • WP_LANG_DIR #
    Absolute path to the directory with the language files.
    Default: WP_CONTENT_DIR / languages ​​ or WP_CONTENT_DIR WPINC / languages ​​
  • WP_PLUGIN_DIR #
    Route absolute to the plugins directory.
    Default: WP_CONTENT_DIR / plugins
  • WP_PLUGIN_URL #
    URL to the plugins directory.
    Default: WP_CONTENT_URL / plugins
  • WP_CONTENT_DIR #
    Absolute path to wp-content .
    Default: ABSPATH wp-content
  • WP_CONTENT_URL #
    URL to directory wp-content .
    By default: {Site URL} / wp-content
  • WP_HOME #
    URL of the cover of your WordPress.
  • WP_SITEURL # [19659009] URL to the root directory of your WordPress.
  • WP_TEMP_DIR #
    Absolute path to a directory where temporary files can be saved.
  • WPMU_PLUGIN_DIR #
    ] Absolute path to the plugins directory available in multisite.
    Default: WP_CONTENT_DIR / mu-plugins
  • WPMU_PLUGIN_URL #
    URL to plugins directory available in multisite.
    Default: WP_CONTENT_URL / mu-plugins

Database

  • DB_CHARSET #
    Defines the character map of the database.
    Values: See the MySQL docs (Default: utf8 )
  • DB_COL LATE #
    Defines the database comparison.
    Values: See the MySQL docs (Default: utf8_general_ci )
  • DB_HOST #
    Defines the database server.
    Values: IP address, domain and / or port (Default: localhost )
  • DB_NAME #
    Defines the name of the database.
    Value: name of the database
  • DB_PASSWORD #
    Defines the password for the database.
  • DB_USER #
    Defines the user for the database.
  • WP_ALLOW_REPAIR #
    Allows you to automatically repair and optimize database tables with /wp-admin/maint/repair.php .
    Value: true
  • CUSTOM_USER_TABLE #
    Allows you to define a custom user for the database.
    Value: name of the table
  • CUSTOM_USER_META_TABLE #
    Allows you to define a customized user meta table.
    Value: table name

Multi-site

  • ALLOW_SUBDIRECTORY_INSTALL ] #
    It allows you to install Multisite in a subdirectory.
    Value: true
  • BLOGUPLOADDIR #
    Absolute path to the load directory of the particular site.
    Default: WP_CONTENT_DIR /blogs.dir/ {Blog ID} / files /
  • BLOG_ID_CURRENT_SITE #
    Blog ID from the main site.
    Default: 1
  • DOMAIN_CURRENT_SITE #
    Domain of the main site
    Default: domain
  • DIEONDBERROR #
    When defined, errors in the database are displayed.
    Value: true
  • ERRORLOGFILE #
    When it is defined, database errors are saved in a log file.
    Value: route absolute to a file with write permission
  • MULTISITE #
    Defined if you are going to use Multisite.
    Value: true
  • NOBLOGREDIRECT #
    Defines a URL of a site to which WordPress should redirect if the record is closed or a site does not exist.
    Values: % siteurl% for the main site or Custom URL
  • PATH_CURRENT_SITE #
    Path to main site.
  • UPLOADBLOGSDIR #
    Path to base upload directory, relative to ABSPATH .
    Default: wp-content / blogs.dir
  • SITE_ID_CURRENT_SITE #
    ID of the main site network.
    Default: 1
  • SUBDOMAIN_INSTALL #
    Defines whether a sub-domain will be installed or not.
    Values: true | false
  • SUNRISE #
    When WordPres is defined, it will load the file /wp-content/sunrise.php . ] Value: true
  • UPLOADS #
    Path to the specific upload directory of a site, relative to ABSPATH .
    Default: UPLOADBLOGSDIR / {blogid} / files /
  • WPMU_ACCEL_REDIRECT #
    Activate / Deactivate support for X-Sendfile Header .
    Values: true | false (Default: false )
  • WPMU_SENDFILE #
    Activate / Deactivate support for X-Accel-Redirect Header .
    Values: true | false (Default: false )
  • WP_ALLOW_MULTISITE #
    When it is defined, the Multi-site function (Tools → Configure Network) will be available.
    Value: true

Cache compression of scripts

  • WP_CACHE #
    When WordPress is defined, it will load the file /wp-content/advanced-cache.php .
    Values: true | false ( Default: false )
  • COMPRESS_CSS #
    Enable / Disable compression of style sheets.
    Values: true | false
  • COMPRESS_SCRIPTS #
    Enable / Disable JavaScript file compression.
    Valid: true | false
  • CONCATENATE_SCRIPTS #
    Activate / Deactivate the consolidation of CSS and Javascript files before compressing them.
    Values: true | false
  • ENFORCE_GZIP #
    Enable / Disable gzip output
    Values: true | false

File system and connections

  • FS_CHMOD_DIR #
    Defines the read and write permissions of the directories.
    Values: See PHP Handbuch (Default: 0755 )
  • FS_CHMOD_FILE #
    ] Defines the read and write permissions of the files.
    Values: See PHP Handbuch (Default: 0644 )
  • FS_CONNECT_TIMEOUT #
    Defines the maximum time to establish a connection.
    Values: time in seconds (Default: 30 )
  • FS_METHOD #
    Defines the method to connect to the file system.
    Values: direct | ssh | ftpext | ftpsockets
  • FS_TIMEOUT #
    Defines the maximum time for a lost connection.
    Values: time in seconds (By defect: 30 )
  • FTP_BASE #
    Path to the WordPress root directory.
    Default: ABSPATH
  • FTP_CONTENT_DIR ] #
    Path to directory / wp-content / .
    Default: WP_CONTENT_DIR
  • FTP_HOST #
    Defines the FTP server.
    Values: Address IP, domain and / or port
  • FTP_LANG_DIR #
    Path to the directory with the language files.
    Default: WP_LANG_DIR
  • FTP_PASS #
    Defines the FTP password
  • FTP_PLUGIN_DIR #
    to the plugins directory.
    Default: ] WP_PLUGIN_DIR
  • FTP_PRIKEY #
    Defines a private key for SSH .
  • FTP_PUBKEY #
    Defines a public key for ] SSH .
  • FTP_SSH #
    Activate / Deactivate SSH .
    Values: true | false
  • ] FTP_SSL #
    Activate / Deactivate SSL .
    Values: true | false
  • FTP_USER #
    Defines the FTP user.
  • WP_PROXY_BYPASS_HOSTS #
    Allows you to define some addresses that will not pass through the proxy.
    Values: www.example.com, * .example.org
  • WP_PROXY_HOST #
    Defines the proxy address.
    Values: IP address or domain
  • WP_PROXY_PASSWORD #
    Defines the proxy password.
  • WP_PROXY_PORT #
    Defines the proxy port.
  • WP_PROXY_USERNAME #
    Defines the proxy user.
  • WP_HTTP_BLOCK_EXTERNAL #
    Allows you to block external requests.
    Values: true | false
  • WP_ACCESSIBLE_HOSTS #
    If you define WP_HTTP_BLOCK_EXTERNAL you can add servers that should not be blocked. [194] 59029] Values: www.example.com, * .example.org

Topics

  • BACKGROUND_IMAGE #
    Defines a default background image.
  • HEADER_IMAGE ] #
    Defines a header image by default.
  • HEADER_IMAGE_HEIGHT #
    Defines the height of the header image.
  • HEADER_IMAGE_WIDTH #
    Defines the width of the header image.
  • HEADER_TEXTCOLOR #
    Defines the font color of the header text.
  • NO_HEADER_TEXT #
    ] Enables / Disables support for text in the header.
    Values: true | false
  • STYLESHEETPATH ​​ #
    Defines the absolute path to the sheet of current theme styles
  • TEMPLATEPATH #
    Defines the absolute path to the template files of the current theme. [19659] 256] WP_USE_THEMES #
    Activate / Deactivate the activation of themes.
    Values: true | false

Debug

  • SAVEQUERIES #
    Enables / Disables the saving of queries from the database in an array ( $ wpdb-> queries ).
    Values: true | false
  • SCRIPT_DEBUG #
    Activate / Deactivate the activation of CSS and Javascript compressed files. Valid: true | false
  • WP_DEBUG #
    Enable / Disable debug mode in WordPress.
    Values: true | false (Default: false )
  • WP_DEBUG_DISPLAY #
    Enables / Disables the display of errors on the screen.
    Values: true | false | null (Default: true )
  • WP_DEBUG_LOG #
    Activate / Deactivate the writing of errors in the file /wp-content/debug.log ]
    Values: true | false (Default: false )

Security and cookies

  • ALLOW_UNFILTERED_UPLOADS #
    Allows uploads without filtering for administrators.
    Value: true
  • AUTH_KEY #
    Secret key.
    ] Values: See the generator
  • AUTH_SALT #
    Secret key.
    Values: See the generator
  • COOKIEHASH #
    ] Hash to generate names of cookies.
  • COOKIEPATH #
    Path to the WordPress root directory.
    Default: URL of the cover page without http (s): / /
  • CUSTOM_TAGS #
    It allows you to overwrite the list of secure HTML tags. Take a look at the file /wp-includes/kses.php .
    Values: true | false (Default: false ])
  • DISALLOW_FILE_EDIT #
    Allows you to disable editing of theme files and plugins with the WordPress editor.
    Value: true
  • DISALLOW_FILE_MODS #
    It allows you to disable the editing, updating, installation and deletion of plugins, themes and kernel files from the WordPress desktop.
    Value: true
  • DISALLOW_UNFILTERED_HTML #
    Allows you to disable HTML without filtering for all users, including administrators.
    Value: true
  • FORCE_SSL_ADMIN #
    Activa SSL for the accesses and the desktop.
    Values: true | false ( By default: false )
  • FORCE_SSL_LOGIN #
    Activa SSL for accesses.
    Values: true | false (Default: false )
  • LOGGED_IN_KEY #
    Secret key.
    Values: See the generator
  • LOGGED_IN_SALT #
    Secret key.
    Values: See the generator
  • NONCE_KEY #
    Secret key.
    Values: See the generator
  • NONCE_SALT #
    Secret key.
    Values: See the generator
  • SECURE_AUTH_KEY #
    Secret key.
    Values: See the generator
  • SECURE_AUTH_SALT #
    Secret key .
    Values: See the generator
  • SITECOOKIEPATH #
    Path to your site.
    Default: URL of the site without http (s): / /

That's it, complete! [19659003] And you know, when you know the code there's no spoon!

This list of constants and their descriptions is translated from original article by Dominik Schilling in WPEngineer for its great interest for all.

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading ...

That may also help you: