Does changing ‘WPLANG’ in wp-config.php just effect the admin language or does it have other consequences?

WPLANG effects the whole site not just the admin section, you can use it in conjunction with WPML. It basically sets what language you have translations for but you must include a languages folder inside wp-include with the appropriate .mo and .po files. You can also set WPML to use the default languages directory ( … Read more

Override Current Theme Setting in wp_config.php

Drop this in a plugin & activate. I should note this doesn’t take into account things like child themes – it’s purely for toggling which theme renders based on SOME_FLAG. add_filter( ‘stylesheet’, ‘switch_ma_theme’ ); add_filter( ‘template’, ‘switch_ma_theme’ ); function switch_ma_theme() { // Return the theme directory name return SOME_FLAG ? ‘theme-1’ : ‘theme-2’; }

How To Make Connection To WordPress Data Base In A Plugin?

I found the answer my self. First open your wp-config.php and check the bottom of file that Is that contain the below code?… if ( !defined(‘ABSPATH’) ) define(‘ABSPATH’, dirname(__FILE__) . “https://wordpress.stackexchange.com/”); If yes then add the below code to make the connection in your plugin PHP files to connect with wp-config.php file that contain Database … Read more

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes)

Add the following at the top of wp-config.php: ini_set(‘memory_limit’,’128M’); Although you should use WP_MEMORY_LIMIT when you can, we see in /wp-includes/default-constants.php that WordPress doesn’t do much more than use ini_set itself. Note: This is just one more thing to try, but you’ll likely end up having to have your host fix this issue.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)