Nastavení jiného jazyka pro web (frontend) a jiného pro administraci

User Language Switch…uage-switch/

Allows backend users to set the language displayed in the back-end and front-end of your site. It also allows to translate pages and posts. Define one language for admin and the other for theme. Don’t define WPLANG in your wp-config.php file.

A nebo:

// setup one language for admin and the other for theme
// must be called before load_theme_textdomain()
function set_my_locale($locale) {

        $locale = ( is_admin() ) ? "cz_CS" : "en_US";
        setlocale(LC_ALL, $local );
        return $locale;

add_filter( 'locale', 'set_my_locale' );

Automatizace instalace a konfigurace

Core Tweaks WordPress Setup…core-tweaks/

This plug-in completely automates the proper setup of your WordPress blog for search engine optimization. Primarily for use in new WP installations. Almost everything is covered, from changing the permalink structure to deleting the Hello World sample post and comment. All the options are accessible from one single page.

Související: Hromadná instalace pluginů

Další informace k automatické instalaci a konfiguraci:…-plugin-way/…tallphp-way/


Wp-config.php is the single most important file in your entire WordPress installation. This file can be used to configure database functionalities, enhance performance, and improve security on all WordPress powered websites and blogs.

Debugging WordPress

For developers, WordPress has this awesome debugging feature which allows them to find errors, and deprecated functions. By default, this function is set to false, but in the development mode, developers should have it enabled.

define('WP_DEBUG', false); // disable debugging mode by default
define('WP_DEBUG', true); // enable debugging mode

Blog/Site Address

In your WordPress Settings, you specify the WordPress address and the site address. Those are added in your database, and every time the developer calls it in the template, it is running a database query. In WordPress 2.2, these two settings were introduced to override the database values without changing them:

define('WP_HOME', '');
define('WP_SITEURL', '');

By adding these in your wp-config.php, you are reducing the number of database queries thus increasing your site’s performance.

Override File Permissions

You can override file permissions, if your host has restrictive permissions for all user files. Most of you do not need this, but it exists for those who need it.

define('FS_CHMOD_FILE', 0755);
define('FS_CHMOD_DIR', 0644);

Post Revisions

In the recent versions of WordPress, there is a super awesome feature called Post Revisions. This function auto-saves posts just incase if your browser crash, or something else happen. It also allows users to restore back to previous versions if they don’t like the changes and so on. While a lot of us love this feature, some of us really hate it with a passion. This function has numerous configuration, so you can make it work just right for you. By default WordPress saves post every 60 seconds, but if you think that is way too much, then you can modify it to your likings with this configuration:

define('AUTOSAVE_INTERVAL', 120); // in seconds

Some posts have 10s, 20s, or even 100 post revisions depending on the blog owner. If you think that feature annoys you, then you can limit the number of revisions per post.

define('WP_POST_REVISIONS', 5);

You can use any integer you like there.

If none of the settings above satisfies you, then you can simply disable the post revisions feature by adding this function:

define('WP_POST_REVISIONS', false);

WordPress Trash Feature

In WordPress 2.9, there was a new “Trash” feature added to the core. This feature works just like the recycling bin, so instead of deleting the post permanently, you would send it to the trash. This helped those users who accidently click on Delete button, and it can be any of us. The bad part about this trash feature is that you have to empty the trash regularly. By default the trash empties itself every 30 days. You can modify that by using the following function:

define('EMPTY_TRASH_DAYS', 7 ); //Integer is the amount of days

FTP/SSH Constants

By default, WordPress allow you to upgrade plugins, and WordPress core versions from within the backend. There are some hosts that requires an FTP or SSH connection everytime you try to upgrade, or install a new plugin. By using the codes below, you can set the FTP or SSH constants and never have to worry about it again.

// forces the filesystem method: "direct", "ssh", "ftpext", or "ftpsockets"
define('FS_METHOD', 'ftpext');
// absolute path to root installation directory
define('FTP_BASE', '/path/to/wordpress/');
// absolute path to "wp-content" directory
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
// absolute path to "wp-plugins" directory
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
// absolute path to your SSH public key
define('FTP_PUBKEY', '/home/username/.ssh/');
// absolute path to your SSH private key
define('FTP_PRIVKEY', '/home/username/.ssh/id_rsa');
// either your FTP or SSH username
define('FTP_USER', 'username');
// password for FTP_USER username
define('FTP_PASS', 'password');
// hostname:port combo for your SSH/FTP server
define('FTP_HOST', '');

Auto Database Optimization

In WordPress 2.9, there was a feature added called Automatic Database Optimization. To enable this feature, you would need to use the following function:

define('WP_ALLOW_REPAIR', true);

Once activated, you can see the settings on this page:…t/repair.php The user does not need to be logged in to access this functionality when this define is set. This is because its main intent is to repair a corrupted database, Users can often not login when the database is corrupt. So once you are done repairing and optimizing your database, make sure to remove this from your wp-config.php.

Increase PHP Memory Limit

There is a common WordPress Memory Exhausted Error that users have seen when activating some plugin. You can increase the PHP Memory Limit through wp-config.php file. Simply paste the code below:

define('WP_MEMORY_LIMIT', '64M');

Note: This feature may not work with some web hosts.

WordPress Error Log

For developers, it is useful to have an error log for a site. You can easily create a simple error log for a WordPress powered website by using wp-config.php file. First create a file called “php_error.log”, make it server-writable, and place it in the directory of your choice. Then edit the path in the third line of the following code:


Also, for an error log, you should instead use these constants:

define( 'WP_DEBUG', true ); // Enables error reporting.
define( 'WP_DEBUG_DISPLAY', false ); // Hides the errors.
define( 'WP_DEBUG_LOG', true ); // Logs errors to wp-content/error.log (or use @ini_set('error_log') )

Automatické vysypání koše

define('EMPTY_TRASH_DAYS', 30 ); // Vysypání koše po 30 dnech

Přesunutí složky WP-Content

define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/newlocation/wp-content' );


define( 'WP_CONTENT_URL', '' );

cesta k adresáři s pluginy

define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/newlocation/wp-content/plugins' );
define( 'WP_PLUGIN_URL', '');

Pokud nefunguje localhost a neznáme jméno DB serveru


Nezapomeňte konfigurační soubor zabezpečit.