New answers tagged

-1

Try using the plugin called Duplicator https://wordpress.org/plugins/duplicator/ I always it to migrate website. You should not face any problems with this one As for the errors you are facing there might be additional files that blue host might keep. Do check for any unwanted files or folders


1

You need to turn WP_DEBUG on in your wp-config.php: define( 'WP_DEBUG', true ); That'll help a lot with working out where that 500 error is coming from. Based on the PHP versions you've mentioned, I'm 99.999% sure that the error is due to a feature that isn't available in PHP 5.2.17. You're probably looking at shorthand array notation (eg. $array = []; - ...


0

I always find it way less confusing to get the results from one table and loop them rather than to try to join them like that... eg. global $wpdb; $query = "SELECT post_id FROM wp_postmeta WHERE meta_key='fake_author' AND meta_value='11111'"; $results = $wpdb->get_results($query); foreach ($results as $result) { $query = "UPDATE wp_posts SET ...


0

This is generally not a good idea. See this WordPress database diagram. You need to consider: posts that have categories or tags (terms), their relationships, term meta, and taxonomies posts that have authors (users) posts that have comments things that are actually posts that you might not realise are posts (eg. almost everything in WordPress is a post - ...


1

You can use the user_register hook to capture user information after their details are saved to the database.


0

Content includes the author user and comments (and probably more). Dumping just part of the DB as a way to export/import doesn't sound like a very robust idea. DBs are relatively small, and there is almost no reason not to export/import the full DB instead of trying to hack things.


-1

// This won't show date in all cases the_date( 'F d, Y' ); // This will show date in all cases the_time( 'F d, Y' );


0

Woah there. You've just opened up a can of SQL injection. I use the default get_query_var('s') that I believe is automatically escaped by wordpress. Not quite - get_search_query() will do that, but get_query_var( 's' ) gets the "raw" value. Regardless, always use wpdb::prepare or similar escaping before executing SQL: $query = $wpdb->prepare( "...


1

Look at this code public function column_default( $item, $column_name ) { switch ( $column_name ) { case 'address': case 'city': return $item[ $column_name ]; default: return print_r( $item, true ); //Show the whole array for.... } } Since you are only trying to render user_id , browser and ...


2

Android Push Notification requires you to have GCM Keys and Project ID which needs to be registered on Google Developer console. I am assuming you are able to get your users registration IDs and stored in a table. To send Android Push Notification create a function somewhere in your functions file function AndroidPushNotification($registration_ids, $...


1

Down- and uploading CSVs is a tough one that forces you to make a bunch of steps manually which is prone to human error (and typos). My suggestion would be to do something that you can battletest locally in a local copy of your DB. Steps to follow: Make a database dump using the mysqldump tool and use scp to copy it to you locally Pull up a local WP ...


1

Two things, at least: It looks like you need to declare the global $wpdb and you're using $wpdb->insert() incorrectly. The insert() method doesn't take your SQL query but a list of variables. It then create the SQL for you. See here You can execute SQL directly but it's a different process.



Top 50 recent answers are included