How to fix “no title” issue for just uploaded images under WordPress dashboard

The symptoms are looking as the following:

Not sure how this happened probably because of some media plugin but this occurs under your WordPress –> Media when you’re trying to upload any new picture

Anyway I have fixed it by  altering wp_posts table to make ID as index table and enabled AUTO_INCREMENT as showed below

Detailed steps:

- login your phpMyAdmin
- click your database 
- click wp_posts table (watch your prefix)
- click "Structure" tab
- click "More" to set Index/Primary
- click "Change" to enable A_I (AUTO_INCREMENT)
- click "Save"

Should be going well now.… Read the rest

How to set up SMTP for Office 365 using WordPress plugin Easy WP SMTP

- Install WordPress Easy WP SMTP Plugin
- WordPress --> Settings --> Easy WP SMTP --> SMTP Setting and append the following settings:
- From Email Address : (your email address here)
- SMTP Host : smtp.office365.com
- SMTP Port : 587
- Type of Encryption: TLS/STARTTLS
- SMTP Authentication: YES
- SMTP Username : (your email address here)
- SMTP Password : (your email address password here)
- Click Save.
Read the rest

How to fix a login issue after WordPress Multisite split

The slave installation will lose users

wp user list

+—-+————+————–+————+—————–+——-+
| ID | user_login | display_name | user_email | user_registered | roles |
+—-+————+————–+————+—————–+——-+
+—-+————+————–+————+—————–+——-+

And you won’t be able to create new admin user because you don’t have appropriate MySQL tables

wp user create admin [email protected]
Read the rest

How to change WordPress site URL and home URL using wp-cli tool

To check site url:

wp option get siteurl

To update your website’s URL:

wp option update home 'https://alltime.pp.ua'
wp option update siteurl 'https://alltime.pp.ua'

This will update to MySQL records “home” and “siteurl

To run in-deep updates read the following article:

https://alltime.pp.ua/blog/how-to-change-wordpress-main-url-to-new-one/Read the rest

How to create a post using wp-cli

Install wp-cli and run something like the following:

wp post create --post_type=page --post_status=publish --post_title='Home' 
wp post create --post_type=page --post_status=publish --post_title='About'
wp post create --post_type=page --post_status=publish --post_title='News'
wp post create --post_type=page --post_status=publish --post_title='Contact'
Read the rest

How to install templatemonster theme using wp-cli

Upload your template_XXXXX_XXXXXXXXXXX.zip to folder where your WordPress is installed

Unzip template_XXXXX_XXXXXXXXXXX.zip to some temporary folder.

Then find two zip files under temp_extract/theme/ folder and move them to document root directory of your website.

unzip template_XXXXX_XXXXXXXXXXX.zip -d temp_extract
mv temp_extract/theme/CherryFramework.zip ./
Read the rest

How to fix broken WordPress Elementor plugin

First of all create a backup of your website files/folders/database

cd ~/public_html

Rename broken plugin’s folder:

mv wp-content/plugins/elementor wp-content/plugins/elementor_old

Don’t worry, currently all settings are presaved in your database.

Now do reinstall of the Elementor plugin using wp-cli with –force:

wp plugin install elementor --force

Should be ok now!… Read the rest

How to remove WordPress spam users using MySQL command line

Here is described way to remove spam users you got on 2019-03

select * from wp_users where user_registered like '2019-03%';

MariaDB [db]> select * from wp_users where user_registered like '2019-03%';
15215 rows in set (0.027 sec
delete from wp_users where user_registered like '2019-03%';

MariaDB [db]> delete from wp_users where user_registered like '2019-03%';
Query OK, 15204 rows affected (0.682 sec)
Read the rest

How to remove WordPress spam users using WP-CLI

If you have a huge amount of spam users in your database you need to check this post https://alltime.pp.ua/blog/how-to-remove-wordpress-spam-users-using-mysql-command-line/ as the way below will take ‘forever’ 🙂

Supposed you’ve decided to leave just ‘administrator’

Using command below you found a pattern

wp user list

So, now run to remove them:

wp user delete $(wp user list --role=author --field=ID)
wp user delete $(wp user list --role=customer --field=ID)
wp user delete $(wp user list --role=subscriber --field=ID)

You should be asked and if you are sure just type ‘y

–reassign parameter not passed.… Read the rest