Restrict access to admin-post.php

I don’t think that disabling admin-post.php is a good idea. Such solution may break WP, some plugins and themes. But there is another, much simpler solution. Just add your action for admin_post (without nopriv) and process it properly – so if it’s a login action and user is already logged in, redirect him to proper … Read more

WordPress admin page not found error

If you don’t have database access for some reason, you can also use // use these in your wp-config.php define( ‘WP_HOME’, ‘http://example.com’ ); define( ‘WP_SITEURL’, ‘http://example.com’ ); or // use these in your functions.php update_option( ‘siteurl’, ‘http://example.com’ ); update_option( ‘home’, ‘http://example.com’ ); to regain access to your site. You can read more about changing the … Read more

Why is WordPress enqueuing admin relevant scripts (e.g., React, ReactDOM, Redux, hooks, TinyMCE etc) when not logged in?

If your bootstrap or other enqueued scripts have a dependency or name conflict, this could enqueue all these scripts. There are a large number of common scripts in WordPress core that are enqueued under common names. I always recommend prefixing your script names with something specific. wp_enqueue_script( ‘theme-bootstrap’, ‘https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js’, array( ‘jquery’ ), ‘4.3.1’, true );

Unable to properly login

The URL in the wp-options table (in two places) needs to include the protocol – the ‘http://’ or the ‘https://’ part. That’s why, I believe, you are getting the double ‘dev.site’ in your URLs. That’s the first think I would check.

Add styles to wordpress admin on the Page List

If you want to go with PHP solution, then the post_class filter hook (codex) would allow you to do that – see the example below. You can paste that to your functions.php. Just be aware that hiding the post from posts list doesn’t make it restricted from access, users can still use the post’s edit … Read more

Icons are missing from Visual Editor

After a few more days of frustrating testing, I managed to track the issue down to the External Links Rewrite option in Siteground’s Site Tools, under SSL options. When HTTP Enforce is enabled with the optional External Links Rewrite option (being able to see these changes virtually immediately in the browser requires a Force Refresh, … Read more

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