Articles of database

MySQL Syntax Error upon restoring database from backup

Performed a bad import to my WordPress install and decided to restore from the mqSQL backup (full export) I had made minutes earlier. Dropped all tables in the database and then did an import from my .sql file. I encounter the error below in PHPmyAdmin and find that only 22 of my 44 tables were […]

Ajax with jQuery UI dialog not working

I am trying to update my custom database table when changes are made in a dialog box. The script for the dialog box and ajax call is as follows – jQuery(document).ready(function($){ $(“td > span”).click(function(){ var id = $(this).attr(‘id’); var message = “message”+id; var content = jQuery(“#”+message).text(); var $dialog = $(“<div></div>”).html(“<textarea style=’width:99%; height:90%’ class=’popup-content’>”+content+”</textarea>”).dialog({ height: 400, […]

The ideal place for storing persistent PHP objects

I’m writing some plugins that do background batch processing, i.e. operations that take longer than 30 seconds. I’m creating objects with the necessary job parameters set like this (this is a hugely simplified example): class MyPlugin_Create_Terms { public $job_id; public $terms; public $taxonomy; public $created = 0; public function init( $terms, $taxonommy ) { $this->job_id […]

Merge two databases: OLD SITE -> NEW SITE

I am working to a restyle of a website. I made DB dump from remote server and made local installation, then started to work on my local machine. While i’ve been working other post have been added to remote site, so database has new entry that i missed. Now i need to put online my […]

How to log database changes during an upgrade?

I have WordPress installed in a classic LAMP configuration. Is there any way to, in a protected environment (like staging), automatically log all database changes (i.e. drop indexes or alter tables) done by a WordPress upgrade process?

js Conflict in admin panel – I guess it's from the core WP installation

A client’s site: causing serious js conflict or js loading disabilities, is under custody. Activating DEBUG, Deactivating all Plugins, and Activating Default theme “T13” found that, still the problem resides. The DEBUG is totally fine – no disabilities or mis-functionalities. It was in an Old WP version, I updated everything – so now it’s all […]

Is there a shortcut to change bulk BMP images to JPG images in a site?

Images in WordPress posts, as I understand, are uploaded manually. They are uploaded by default to uploads folder. A client of mine reported that, in one of his site, he uploaded all the images in BMP format. Now he realized the consequences of his mistake. He wants to make them JPG now. And there are […]

Add agenda items and notifications

Let’s say for example that I’m creating a website for a sports club. And I’d like to offer the coaches and technical staff to be able to add tournements. What I’d like to do with this data is ofcource display it on the Tournements page. Or maybe even a notification in the banner of the […]

Split a database will improve performance?

Hi to all I’m running a WordPress MS installation and I would like to move a couple of heavy “sub” blogs on a different DB, will it encrease my performances? Actually I’m on a dedicated server with quadcore 2.5 Ghz, 6GB ram and a few nice stuff like Lightspeed eaccelerator and so on. I’m a […]

Why does dbDelta() not catch MysqlErrors?

From what I can see, dbDelta() is designed to suppress database errors that occur during its operation. Generally speaking, this seems to be the case, but New Relic is still reporting MysqlErrors from the function. The exact error message is of the format: MysqlError: Table ‘xxx.wp_yyy_posts’ doesn’t exist From dbDelta() in /wp-admin/includes/upgrade.php, we have: // […]