New answers tagged

0

You can set up a new connection from function: $wpdb_b = new wpdb( "user", "password", "brian_db", "localhost" ); $wpdb_b->get_results( "SELECT * FROM brian_table" ); Happy Coding


0

You should have a remote mysql option in your cpanel to allow you to do that if not then you may ask your hosting provider for more assistance after that: Use the following configuration settings for connecting to your database: Host name = (use the server IP address) Database name = (cpanelUsername_databaseName) Database username = (...


0

As @fischi pointed out, it should be safe to delete empty values because get_post_meta() returns the same value for non-existent and empty meta keys, unless you somehow rely on the keys being set when fetching all metadata at once. WP 3.1 introduced the filters add_{$meta_type}_metadata and update_{$meta_type}_metadata that you can use to clean up empty ...


0

You can use WordPress Import/Export tool to export pages and posts from your dev site to the production site. Keep in mind that you need to manually update all url in the production site after the import (e.g change dev.example.com to example.com) Copy the entire database is risky if your production site has customer login and order records. I am looking ...


0

To update the Nickname use: UPDATE wp_users SET user_nicename = 'new_nick_name' WHERE user_nicename = 'x';


1

You should have not searched the field and replaced all the references to wp_ with anything. For example : the value of the entry with meta_key wp_page_for_privacy_policy will be change to wp_addtionnal_prefix page_for_privacy_policy. Hence there could be a lot of misfitted values in your table. A better way would have been to : export the DB import the ...


0

After a bit of research, this can be achieved by using the function https://developer.wordpress.org/reference/functions/get_user_meta/


1

Got it...took all day, but now finally I can finally sleep. This solution is for a set of databases that reside on the same server, even if they are in different accounts. Thus you do not need to set the remote server access in the CPanel. The key is to find the user name and password, for the wordpress database you wish to gain access to. This can be ...


0

I know this is old but here is the possible solution: $q->set('orderby', 'product_new product_old product_almost_new'); $q->set('order', 'DESC'); So just try to pass parameters as a string in required order.


0

I have encountered the same issue but with product attributes, since I had more than 20000 products and much more product attributes, the queries were very slow. What I did was, in order to make it faster, wrote an small plugin converting tags to custom fields and then displayed those on the page, but in your case if you need the tag archive pages and its ...


Top 50 recent answers are included