Prevent WordPress updates from overriding custom language translations?

Modify your installation such that your custom Farsi language files are associated with a non-standard WPLANG value. For example, instead of the standard ‘fa_IR’, maybe try something non-standard like ‘farsi_IR’ (or even ‘myCustomFarsi_IR’). This way, when new WordPress versions are released for the “official” Farsi version, you will no longer get updated.

wp-config.php being deleted

The problem turned out to be that wp-config was infected with some sort of code. Typical of what you see at the top of infected .php files. I have cxs running on the server and it was, quite rightly, detecting the malicious (I assume) code and quarantining the file. When I restored the file, because … Read more

What should be disabled to run on an internal network with no access to the Internet?

After more fruitless searching, I stumbled across this article from WP Tavern which mentioned a plugin then called “WP Local Dev Environment,” now called Airplane Mode. The plugin blocks a long list of things that WordPress does which require checking something from the Internet. While it is intended to be toggled on or off depending … Read more

Including a 3rd party library in WordPress which needs to be accessible by wp-config

1st, the key should be generated once, not per request. The tutorial is suggesting you generate it via the library (probably via cli, or one off script you run in the browser) and then simple add: define(‘JOSH_ENCRYPT_KEY’, ‘the-random-key-you-generated-gets-copy-pasted-in-here-manually’); into your wp-config.php file, so you dont need the lib to be in scope at that point. … Read more

Can the Akismet API key be pulled from the plugin?

After reading several articles, discussing with the community, diving through the Akismet documentation and reviewing their plugin I’ve found if you want test to see if the plugin is active or deactivate you can use: if (function_exists(‘akismet_verify_key’)) : echo “true”; else : echo “false”; endif; After activating the plugin and entering the API key in … Read more

Best practice differences in DB options and wp-config between live, staging and local WordPress environments?

Seems like a good list you have going… Just a few that come to mind: SCRIPT_DEBUG to false on live and true on staging. WP_CACHE to true on live and false on staging. ping_sites to empty on staging to disable ping services. default_pingback_flag to 0 on staging to not send outgoing pingbacks. Maybe install a … Read more

How to display error on specific template?

@PieterGoosen gave some good advice. Focus on that, But if you really wan it, then you can set debug ON temporarily on your website this way. In your wp-config.php use this instead. if ( isset( $_GET[‘debug’] ) && ‘debug’ == $_GET[‘debug’] ) { define( ‘WP_DEBUG’, true ); } Then access your website homepage/any page and … Read more

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