Someone keeps changing my SITEURL (mysql injection or xss?) [closed]

YOu need to deeply look throughout your site for the ‘infection’/malware code. This would include the following steps: update everything (WP, themes, plugins) change credentials on everything (hosting, FTP, admin-level users) create a new admin user, log in as it, then delete the user called ‘admin’ (or demote to ‘subscriber’) look at all folders for … Read more

how do I secure my WP website from hackers? [closed]

Start in the Codex: https://codex.wordpress.org/Hardening_WordPress . Basically, strong passwords on all accounts (hosting, FTP, email, WP users), and ensuring updates on WP/Theme/Plugins are done regularly. Also, carefulness with themes and plugins you use. Look at the support areas of both for other’s issues. Consider avoiding themes/plugins that have not been updated lately, or don’t have … Read more

Running multiple security plugins

In my opinion, no: using two plugins that cover the same features is a bad idea. Why? It is very likely that both plugins use the same hooks and filters and so on and will result in conflicts (e.g. .htaccess etc.). JetPack is too overloaded with useless stuff, though it is a high temptation to … Read more

Custom API plugin to execute 3rd party API to retrieve data

If you need to pass username and password for Basic Auth you need to send that in headers e.g. $headers = array(‘Authorization’ => ‘Basic ‘ . base64_encode( YOUR_USERNAME . ‘:’ . YOUR_PASSWORD ); $response = wp_remote_post( $url, array( ‘method’ => ‘POST’, ‘timeout’ => 45, ‘headers’ => $headers ) ); If you need to pass username … Read more

Decoded malware code [closed]

The malware stores an array of PHP fragments to execute at the bottom of its own file, delimited and encoded using the MD5 hash of the filename. It has a specific GUID to control it; on start up it checks all POST and cookie values for properly-encoded commands: PHP serialized arrays, XORed with both the … Read more

Sanitize user input fields before wp_insert_post

If calling, sanitize_text_field(), it actually call an internal function _sanitize_text_fields() and add a filter for override. So First look at _sanitize_text_fields(), which actually do Checks for invalid UTF-8, Converts single < characters to entities Strips all tags <——— including wp_strip_all_tags() here Removes line breaks, tabs, and extra whitespace Strips octets That’s mean if calling sanitize_text_field(), … Read more

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