How to fix WordPress Media error Unable to create directory uploads..

You may face something like the following upon uploading an image using your WordPress –> Media section


“foto-0012.jpg” has failed to upload.
Unable to create directory uploads/2022/02. Is its parent directory writable by the server?

Fix 1:

Double check you have files/folders permissions 644/755 accordingly

find .
Read the rest

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 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 ''
wp option update siteurl ''

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

To run in-deep updates read the following article: 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 to folder where your WordPress is installed

Unzip 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 -d temp_extract
mv temp_extract/theme/ ./
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