Tag Archives: WordPressHacks

How To Change Default Language Configuration To Your Native Language In WordPress ?

By default English is the localized language of your WordPress site that can be changed to your native language:

Open your wp-config.php file and add these lines:

define(‘WPLANG’, ”);
define(‘LANGDIR’, ”);

Important: Language translation file (.mo) must be placed in the default location – wp-content/languages (first) and then wp-includes/languages(second). As in the above function, you can define your own language directory. Learn more about WordPress in Your Language

How To Increase PHP Memory Limit In WordPress ?

You might have noticed common WordPress error sometimes while activating a new plugin or some other task:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx

This error shows up when you exceed your default Memory Limit. For fixing it up wp-config.php file and add the following line:

define(‘WP_MEMORY_LIMIT’, ’64M’);

How To Modify Post Auto-Save Configuration In WordPress ?

By default WordPress auto saves post on every 60 seconds, but you can easily modify this time according to your like. Open your site’s wp-config.php file and add the following line just above the Happy Blogging line:

define(‘AUTOSAVE_INTERVAL’, 120); // in seconds

In the above line I have given time of 120 seconds, you may change that as per your requirement.

You can also modify post revisions by limiting the number of revisions per post:

define(‘WP_POST_REVISIONS’, 5);

And for disabling post revision, set it to false as shown below:

define(‘WP_POST_REVISIONS’, false);