Useful Tips For Administering WordPress

Last Updated: Jun 7, 2022 | WordPress Tips

We love learning new tweaks for WordPress. The more we learn, the more we see how versatile WordPress truly is.

Quick Note on a Best Practice for Tweaks

You should avoid putting your tweaks into the rewrite.php file since you will most likely have to re-edit the file every time there is a WordPress update.

You should add these tweaks into your theme’s functions.php file or otherwise make your own custom plugin.

Changing the Author Permalink Base

Let’s say you are after something like as opposed to the default author permalink base

global $wp_rewrite;
$wp_rewrite->author_base=“conqueror”; // Change this to whatever you wish

Mass Disable Pingbacks on Posts and Pages

These queries mass disable Pingbacks on Posts and Pages for published pages. The alternative to these queries is opening each page one by one to untick the Pingback feature.

Posts: UPDATE wp_posts SET ping_status='closed' WHERE post_status='publish' AND post_type='post';
Pages: UPDATE wp_posts SET ping_status='closed' WHERE post_status='publish' AND post_type='page';

Set All Users’ Display Name (Nice Name) to their User ID

This isn’t as SEO friendly as having intelligible display names but this could be useful if you have a members only website, are using emails as user names, or otherwise need to anonymize your user base. For example, the query below will change your author URL to something like this:

UPDATE wp_users SET user_nicename=ID;

  • If you want a little more precision, you can set a new display name depending on the login name. Be sure to change newDISPLAYname and yourLOGINname to your actual values or this query will not update any entries.UPDATE wp_users SET user_nicename='newDISPLAYname' WHERE user_login='yourLOGINname';
  • If for some reason you can’t remember your login name or need to see a list of user logins, then run this query:SELECT user_login FROM wp_users;



Related Content