WordPress for a very large website

…would WordPress be able to render the website in less than one second… WordPress is perfectly scalable to the amount of content and user base you’re describing. You just need the horsepower for httpd (apache/nginx) to be able show one second page loads and have the database server (mysql, maria) respond fast, too. You also … Read more

How to reset the post ID increment

I also happened to me once, I only had like 10 real post, so what I did was to go to phpMyAdmin, make sure your that on my wp_posts and wp_posts_meta tables are only information about the 10 real posts IDs, from the mysite/wp-admin/export.php I exported all the posts (10 of them), I run the … Read more

Best way to move live site local

Why didn’t you try to copy your live website manually. It’s not as easy as using a plugin but much more error proof. You will need to follow these steps. Make a dump of MYSQL database on server. mysqldump -u username -p -h localhost dbname > domain.sql Create a archive of your WordPress website on … Read more

How to close wpdb connection? [duplicate]

WP 4.5 had introduced wpdb->close() method to close connection in current instance. Old answer There is no explicit method. It stores link identifier in $wpdb->dbh field, but it is protected, so not convenient to run close on.

Increment value (value = value+1) of $wpdb->update

You don’t. Not with the WPDB update() function. The update function assumes that the values of the columns are strings. You can override that with the format parameter, but that only allows %d, %f, and %s (integer, float, string). It doesn’t allow operations on columns like total+1. You’d have to use the query() function directly … Read more

Programmatically changing role information; editing role name and deleting

There’s a whole host of functions specifically for this purpose; http://codex.wordpress.org/Function_Reference#User_and_Author_Functions Of particular interest (but not limited to) are, add_cap add_role get_role map_meta_cap remove_cap remove_role As well as numerous other user related functions that will allow you to verify/validate their authority based upon your use-case scenario and so on. Looking in wp-includes/capabilities.php you we can … Read more

When importing database, it shows error

This issue is as a result of your server not supporting the utf8mb4_unicode_520_ci collation type. To resolve this you should convert the collation for all tables with utf8mb4_unicode_520_ci to utf8_general_ci If you’re exporting through phpmyadmin, you can: Click the “Export” tab for the database Click the “Custom” radio button Go the section titled “Format-specific options” … Read more