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 fix “Sorry, you are not allowed to access this page.”

Using WP-CLI

If you see an empty ROLES then it is

wp user list
+----+------------+--------------+--------------------------------+---------------------+---------------+
| ID | user_login | display_name | user_email            | user_registered                | roles |
+----+------------+--------------+--------------------------------+---------------------+---------------+
| 1  | admin1     | admin1           | [email protected] | 2018-06-19 17:00:02 |         |
+----+------------+--------------+--------------------------------+---------------------+---------------+

So add admin right for this user:

wp user set-role 1 administrator

Check it, should be good now:

wp user list
+----+------------+--------------+--------------------------------+---------------------+---------------+
| ID | user_login | display_name | user_email            | user_registered                | roles |
+----+------------+--------------+--------------------------------+---------------------+---------------+
| 1  | admin1     | admin1           | [email protected]
Read the rest

How to change WordPress main URL to new one

Using WP-CLI (preferred):

Enter folder where your WordPress is installed:

[email protected] [~]# cd ~/public_html

Create backup of your database:

[email protected] [~/public_html]# wp db export

The following command won’t do any change because of –dry-run key specified but show you tables and amount of replacement

[email protected] [~/public_html]# wp search-replace 'OLDdomain.com'
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