After a long search, I finally found the error. It is necessary to use
require "/path/to/wordpress/wp-load.php";
to enable wordpress functions in scripts.
Related Posts:
- How do I show data from gravity forms in my template? [closed]
- How to Add an Index to Plugin Database table
- How can I delete orphan keys in WordPress database tables?
- How to delete all records from or empty a custom database table?
- Creating two database tables via plugin
- How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?
- Insert query inserts 2 entries, should insert 1
- Using Vagrant for customizable WordPress Multi-sites [closed]
- Updating WordPress – the best approach (updating wp core, plugins and db)
- How to store ACF custom fields data in a custom table
- How can a Firebase user registration and login be integrated into a WordPress site?
- Bad Request (Invalid Hostname) on working server, database problem
- Plugin Not Working, But Only On GoDaddy Hosted site
- How can I get an image from the uploads dir and enter it in the media library? [closed]
- WordPress plugin DB upgrade
- how to show database content in wordpress post
- What is the easiest way to implement cascading database upgrade for my plugin?
- Ajax with jQuery UI dialog not working
- Set attached to state
- How can I get full attachment url from wp_get_attachment_metadata?
- Remove obsolete plugins artifacts from database tables
- Converting Attachment to Images?
- Is the wordpress user-model changed in wpmu?
- Default Plugin Settings Not Writing to Database
- Creating Tables on Network Activation
- What kind of data is that?
- Cannot login to ADMIN even after changing password in phpmyadmin
- Where to hook my plugin’s action
- Embed a Google Sheet as you view it in a separate tab?
- How to determine what is generating large amount of database queries?
- Building an email signup form. Where should the information be saved in the DB?
- Need help restoring my WordPress blog
- WP plugins for building a database?
- Is it possible to create Custom Post plug-in?
- Prevent duplicate records in plugin table
- Automatic switch to backup database on fail
- How can I change the meta_key for a particular piece of information?
- Create a table with wordpress plugin boilerplate
- WordPress and a secondary database?
- Why this function not working for install database on plugin activation
- WordPress : Explain Plugins & Theme string value in database
- Plugins in WP_Options but not Active
- WordPress as a data-store?
- Gathering and logging data from a plugin: how to do it without race conditions?
- How to pass the API key to the client from the database? [closed]
- Issue running db create table query from static method
- Problem of encoding characters (apostrophes) in my posts publications
- Is there a rule for wordpress plugins developers to not do any database changes upon update?
- Updating options into the wp database performance
- Ajax save data to database on document ready, no data being saved
- Plugin has added weird data in wp_options, set to autoload
- External wpdb connections in different plugins on single page
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- WordPress plugin boilerplate table create
- Search by Attachment ID
- How to relate 3 wordpress components with each other (Create database relationships)
- Creating a search form and displaying results
- How can I store data from custom fields to custom tables?
- Attachments broken after giving WordPress its own directory
- Integrating Custom Database with WordPress
- How to display results from a data table with an encrypted user id?
- add_action for publish_post doesn’t work
- Getting URL GET parameter with Code snippets and storing it in database?
- Same Plugin tables between wordpress installations
- How to use WordPress header function and footer function and not load word press database
- How to securely controlling data without keeping it in postmeta?
- add_action(‘the_content’, ‘my_plugin_content’) is null
- WordPress database problem wp_posts, primary key
- How to allow URL with filename & extension in wordpress?
- Programmatically generate new pages for a site based on page template and content elements accessed via DB
- Remove special characters from filenames
- PHP message: WordPress database error Deadlock found when trying to get lock
- using wordpress login details for other website / application / forum?
- database – multiple wordpress installations using same database – can they share plugin settings?
- how to create database to use it in wordpress website?
- HyperDB failover Delay
- how can i get records from wp_postmeta table using particular meta_key in database?
- How to create a custom page for unrelated database?
- Attachments plugin cannot click media library button [closed]
- User content database [closed]
- Include plugin form in the home page
- Write mysql credentials in plugin
- Differentiate attachment pages in search results
- Is saving multiple options or saving multiple items in one option better?
- How to show post attachment image
- Collaborate on wordpress local website, share files via dropbox?
- Pull Data from DB for Admin Page Display as Relates to Admin Page Class by BA Internet
- How to find an option in the database?
- Is there a plugin that will override the “Error establishing a database connection” message? [closed]
- Get the url of attachments from the post?
- Create New Admin Menu Section – Like how custom post type works, in a way
- Shortcode returning specific content of a post
- get_option returning a different value from what’s saved
- How can I delete the options from DB when the plugin is deleted?
- register_activation_hook not working
- Very slow page loads
- Form with response button after on table after submission
- Can’t save formdata in DB
- Can’t change login logo & css – older plugin data blocking?
- Can you open a media frame to sellect an attachment to associate with another attachment you are editing on an existing media frame?