Disable comment windows for all existing posts (pages/blogposts)

Here is an untested suggestion for wp-cli approach: We can list post IDs of published posts with open comment status with: wp post list –post-status=publish –post_type=post comment_status=open –format=ids and update a post to a closed comment status with: wp post update 123 –comment_status=closed where 123 is a post id. We can then combine those two … Read more

can not upload file .vtt on wordpress 5.0.1

I did some debugging and was able to reproduce and solve the issue, but unfortunately I was not able to figure out the specific cause. Generally speaking, it seems that .vtt files are failing the check performed by wp_check_filetype_and_ext(). I was able to upload .vtt files (Only tested on WP 5.0.1) after creating a simple … Read more

Do I need to sanitize WordPress search query?

No. WordPress sanitizes the search query. To use the sanitized search query, use the_search_query() to echo, or get_search_query() to return, the search query. Edit Based on your edit: Don’t use $_GET[‘s’]. Use get_search_query(). Don’t use $_GET[‘cat’]. Use get_the_category(). All $_GET and $_POST data should be assumed to be inherently unsafe, and should be sanitized/validated accordingly.

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