How to integrate XCRUD with WordPress

Tabular Data Benefits – Tables can be used to summarise complex data in a format which is simple to understand and analyse, enabling swift decisions to be made. A Spreadsheet is a fantastic 2 dimensional tool ideally suited to storing tabular data logically and the use of filters can swiftly retrieve a meaningful tabular image ready for pasting into a slide. However, databases take the 2 dimensional data manipulation model to the next level and the use of logical database queries can retrieve valuable information in very short order.

What is XCRUD – XCRUD not only handles structured data input with full data validation natively – it also provides a means to retrieve, filter and display tabular data in a way no other CRUD application does. Using just a few XCRUD commands in a PHP script taken conjointly with PHP data manipulation and/or pre-filtering logic, the potential is unlimited.

XCRUD and WordPress – WordPress is the industry standard content management system and thankfully XCRUD can be used with WordPress. However, XCRUD does not fully integrate with WordPress in so much as the XCRUD function library is completely separate from the WordPress functions.php library. Installation of the XCRUD WordPress Plugin simply enables the use of text based tags within WordPress page content, for the purpose of executing PHP code with the additional XCRUD function libraries available to the script.

Combined Potential – If you have been around the world of CRUD for a little while you will have seen a great many demos. The common demos are Address books, CRM systems and Commercial management systems of one type or another, however, there is no way in this world that publicly accessible database applications would be considered an acceptable solution in the real world. For this reason coming up a level higher in the system structure access to these pages needs to be controlled. One option would be to upgrade to XCRUD Pro and the other now obvious solution is to integrate in WordPress with pages displaying sensitive data secured and only accessible to logged in users with specified roles assigned. Option 1. costs a bit more – option 2. doesn’t cost anything as the free versions of the redirection and user role plugins work well with the native WordPress system.

We will stick with the cheaper version of XCRUD as despite the fact that XCRUD and WordPress are not fully integrated – restricting access to pages and redirecting users to different pages based on role simply by combining with other WordPress plugins, begins to scratch the surface of the potential and despite the function libraries being separated – the WordPress database management functions are also available to the PHP scripts running between the XCRUD tags.

Below is an example of the native XCRUD tabular output, showing the database management controls – the button functions are disabled for obvious reasons. In this example – a simple WordPress function is called by the PHP script to create the Wordress User.

Client – Admin

Title Surname Company Position Email Mobile  
Dr McDougal Mechatronics Ltd. HR Director mcb@gmail.com 09678945622 View Edit Remove
Dr Rooney Choolers Ltd. Recruitment Analyst cho@yahoo.com 07812345680 View Edit Remove
Dr Rooney Chuckers Ltd HR/Admin hest@yahoo.com 01234567898 View Edit Remove
Mr Funster Froom Loom Ltd. Head of Recruitment felix@yahoo.com 01234575678 View Edit Remove
Miss Bigroom Bigroom Chillers Ltd Project Manager jbig@gmail.com 07234567890 View Edit Remove

Search

Simplifying with Comparison Tables

The XCRUD generated table below has been customised with inputs and data management functions switched off. It lists several of the leading Domain Registrars stored in the WordPress database who provide decent DNS control panels. It also shows a pricing benchmark for .uk domains for which the year 2 price is highlighted as the driver of the buying decision hence that column is displayed sorted in ascending order to show the lowest price at the top.

Registrar Year 1 Price ↑ Year 2 Price Transfer Price  
Pickaweb £6.99 £7.99 £0.00 DNS Wizard Registrar
123-reg £0.99 £9.99 £0.00 DNS Wizard Registrar
GoDaddy £0.99 £11.99 £0.00 DNS Wizard Registrar
Namesco £0.00 £13.98 £0.00 DNS Wizard Registrar

XCRUD does not fully integrate with WordPress, but at this time – no other CRUD application is as feature rich as this and works with WordPress. This is demonstrated by its continued sales.

How its done

From a Wordress Clean Install – Using your favourite FTP client – copy the ‘xcrud’ folder and the file – ‘xcrud_plugin.php’ to the WordPress ‘/wp-content/plugins’ folder and in the WordPress Admin Dashboard navigate to Plugins >> Installed Plugins. You will see the XCRUD Loader Plugin dimmed out – click ‘Activate’.

Now in your FTP client navigate into the xcrud folder and open the xcrud_config.php file to finalise the settings. The required settings could vary depending on the installed WordPress theme but if you are using this one – you will need the following settings.


// default connection
    public static $dbname = 'your-database'; // Your database name
    public static $dbuser = 'your-username'; // Your database username
    public static $dbpass = 'your-password'; // Your database password
 
// scripts
    public static $load_jquery = false; // jQuery, turn it off
    public static $load_jquery_ui = true; // jQueryUI, turn it on

If your table displays with the pre-load spinner active constantly, check jQueryUI is set to true.

Having completed these steps – you can run PHP code including the XCRUD commands within these special tags anywhere on a WordPress page. For example:

In the above example – the displayed table is contained within the database defined in the ‘your-database’ setting in the config file. In my example, the additional table was added to the WordPress database, but it can be separate database if needed. Note: All database tables need to have a Unique field defined as an Index in the database. To satisfy this requirement I have a primary field called ‘rec_num’ defined as having an integer value with the auto-increment attribute set. Without this the database cannot be edited and in the XCRUD context the buttons will not work.

Aiming for Perfection – WordPress Themes

So you are about to run off and setup your WordPress site and install XCRUD, it really couldn’t be simpler. However, there is just one more variable we need to consider to ensure we avoid disappointment. In a nutshell – the established WordPress standards for site theme/template development are very broad and the CSS code and the way the theme interacts with jQuery can cause unexpected results. There is no coding standard to delver what XCRUD needs to work in harmony with WordPress so a bit of trial and error will be needed.

For example – the free 2021 WordPress theme only displays the left side of the XCRUD table and when in edit mode the text on the page becomes intertwined around the XCRUD fields and in view mode the return button disappears. Not the end of the world for some, but most of us will be aiming for perfection – so we need to sort this. Many theme vendors will provide a demo – but I am not aware of any who will provide the opportunity to install the theme and try it before purchasing. So I have done the research for you and found a very two very modern, multi-purpose themes with social network integration and all the mod-cons. The first is the – Kleo WordPress Theme – developed by Seventh Queen and it is available from Themeforest cheap as chips and un-coincidentally is the WordPress theme running on this site. The second is the – Rehub Wordrpess Theme – developed by Sizam and is also available from Themeforest for the same price. On both the full table is displayed, all buttons are displayed and both view and edit mode work perfectly. Have a play.

Ever mindful of the costs, lets have a quick review – The XCRUD 1.7 application costs $39, the XCRUD Pro application costs $99 – a saving of $60. The themes are the only additional cost and both retailing at $59 the numbers stack up. However, the Kleo theme comes with a host of ready made, fully purposed templates ranging from Simple blogs and E-shops, E-Learning and Learning Management Systems, Professional, Business and Portfolio centric sites all with full social integration. The Rehub theme specialises in affiliate marketing and has a whole host of ready made price comparison and product review templates – this one fully integrates with the content egg and affiliate egg plugins which enable product synchronisation with vendors such as Amazon and Ebay. These themes are undoubtedly amongst many available for the price – but we know XCRUD works with these. The Kleo license covers 3 sites and there is no annoying license checking telemetry which needs to be updated years later when you have forgotten about it. With these themes in your arsenal and anything from dynamic tabular data to full blown CRUD apps added to the tool box  – the potential is massive.

Lets not forget about security

Another big benefit of WordPress is the potential for rock solid security, by choosing the right plugins. When setting up a WordPress website – I install the – Wordfence, Google Capcha and Advanced Comment plugins all available free of charge – but that is a whole different story.

In terms of the scope of my thinking – I have written an end to end ‘Candidate Insights Recruitment Process Management Application’ – just by embedding PHP code within these tags on a number of WordPress pages, managing data stored within additionally created tables in the WordPress database. There are PHP based hooks into the WordPress function library and a few free 3rd party plugins to implement user roles and redirection. My design strategy is to never duplicate the functionality offered in free plugins, but I am confident that with XCRUD being used to bridge the gaps between the free plugins and provide a tabular data management interface – anything is possible.

Please note – this site is designed with accessibility in mind, hence the button colour contrast and text labelled buttons.

Terms of Service | Privacy Policy | Copyright © 2025 all rights reserved

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

Log in with your credentials

Forgot your details?