How to access a table in a wordpress database using REST API?
How to access a table in a wordpress database using REST API?
How to access a table in a wordpress database using REST API?
I found the problem. I had defined variables using the names DB_USER, DB_PASSWORD etc in my own database connection config file. I then found that wordpress already defines variables using these exact same names, which are stored in one of the files in the wp-includes directory. So my own defined variables with the same name … Read more
Turns out that a previously-modified line in the Yoast SEO source code had been reverted, so this error came back in debug.log: 1Uncaught TypeError: Argument 2 passed to WPSEO_Link_Watcher::save_post() must be an instance of WP_Post, null given. Disabling Yoast resolved the New Page/Post error, however I believe the root cause was that the database has … Read more
If it’s no extricly neccesary perform an operation in a sql statement I would prefere perfom it over an Array of admin_op data, like : op_sum = get_results( Select fund_user FROM table WHERE type_operation = admin_op ); then var = array_sum(op_sum);
This is the way you could handle it, though opinions may vary. Getting the framework up will be a bit complicated and making it pretty is another task entirely. I would make it sexy by running an AJAX query when you submit the form. The AJAX script collects all the data from the boxes on … Read more
I found the problem! Everything was ok with the transient, the problem was that I’m using php’s substr() to cut an object property value if exceeds maximum characters. When in that string there was an accented character there was a problem with the encoding. So the serialized collection had an encoding issue at character 60000… … Read more
SQL database import #1046 error
Moving a few select DB tables to a new WP instance
From the Revisions documentation page: Revisions are stored in the posts table. Revisions are stored as children of their associated post (the same thing we do for attachments). They are given a post_status of inherit, a post_type of revision, and a post_name of {parent ID}- revision(-#) for regular revisions and {parent ID}-autosave for autosaves. So … Read more
My wp database has been hacked