Articles of database

Make changes of wp-db.php file persistent against updates

I’ve added $this->query(“set session wait_timeout=600″); into wp-includes/wp-db.php file because of “MySQL has gone away” errors in every query and I need to find some way to do the changes in file persistent (I suppose update of WordPress rewrites wp-db.php file). Any ideas? Thanks

Dump custom post type database

I have a custom post type filled with 7k entries by mistake. I want to empty the database for that custom post type. What is the best way to do it?

Is it possible to recover Deleted users?

I’ve accidentally deleted all of my WordPress site users and now I want to recover those deleted users? IS it possible? I’ve not created database backup so is it still possible?

Error message on blog posts only on my local environment

I copied all my WP files from the server to my local WAMP as a dev-environment. Everything works smoothly except when viewing a blog post. I get a good output of all the titles/categories/post-content/ect’ – But with a strange output before the blogs content: content.php Line 68 is this part in the code: __( ), […]

How do I properly update the WordPress database password?

A site that I manage was recently compromised and I am going through the steps to harden and re-secure the site. I would like to change the MySql database password and want to make sure I do not take the site down (for more than a minute). I am also concerned that if I manually […]

Why are no posts showing despite my apparently correct DB restoration?

I restored a backup to MySQL using the phpMyAdmin Import feature. When I browse the DB in phpMyAdmin, I see that my posts are there. But in WordPress, I only see the default out-of-the-box welcome post. Even the WordPress admin shows no signs of the info in the database. (I checked that this is the […]

Alternative functions for mysql_free_result and mysql_ping in wordpress functions

what are the alternative function for mysql_free_result and mysql_ping in WordPress functions , does WordPress function provides all the functions like php ? is it necessary to Free result memory for large WordPress database requests ?

WordPress site URL changed; how to fix it without database access?

we would like your assist on an error that occurred during some changes on the admin panel. We have this site called , it’s for a non-profit company. We changed the WordPress site URL by mistake, we wanted to change the Site URL only. Now we cant log in again to the Admin Panel. […]

Insert Query not working in the form

Many people has asked the same question, I have read those things and mine is different, I am trying to insert some values inside the database from the form but it’s not getting inserted I have a table in the database having 6 columns wanted to insert some values inside only of 4 columns Table […]

Custom WordPress Table wpdb

running into issues querying a custom table and getting results. As of WordPress 3.9, I can no longer run mysql_query(), and have to use $wpdb->query(); So keeping that in mind: Old Code: <?php if (!empty($_GET[‘msg’])) { global $wpdb; $vuser_id = $_GET[‘id’]; $sql = “SELECT * FROM wp_quiz WHERE quiz_id=’$vuser_id'”; $query = mysql_query($sql); $result = mysql_fetch_assoc($query); […]