Articles of database

Importing Multiple DB to one MU database

I have three databases associated with three different WP sites. I set up one MU site, with one database. How should I import each of the three databases?

How to change the database prefix in multisite (WPMU) install

I am starting to implement security features on a client’s website and so I would like to change the WP database prefix. However, the website is a multisite installation (WPMU) and so changing the prefix like you would normally does not work and I do not want to manually change the wp-config files for each […]

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 […]