import (migration) user database to wp-users

get all data from DB1( non-wp-database ) and save to an $array. Use this wordpress code inside your functions.php for insert users into DB2 ( wordpress database). function cxg_wp_insert_user() { foreach ( $array as $arr ) { $user_data = array( ‘ID’ => ”, ‘user_pass’ => wp_generate_password(), ‘user_login’ => $loginName, ‘user_nicename’ => $nicename, ‘user_url’ => ”, … Read more

WordPress site seems convinced that it’s still at its old URL

Silly mistake on my part, At some point I defined my wp-content directories right in wp-config. define( ‘WP_CONTENT_DIR’, ‘/home/user/public_html/site/subdirectory/wp-content’ ); define( ‘WP_CONTENT_URL’, ‘http://www.seocial.ly/site/subdirectory/wp-content’ ); Completely overlooked this when editing my wp-config.

/var/run/mysqld/mysqld.sock

I am not sure why lately ppl define the path to their DB_HOST like you do. (Assuming it is a way server is configurated (or using a MAC) and/or as pseudo layer of security?) Anyway, you will have your reason for it, maybe one of these codelines below could help you. define(‘DB_HOST’, ‘:/var/run/mysqld/mysqld.sock’); I could … Read more

WordPress ERD mistake?

I found the reason: term_id is the ID of a term in the terms table. term_taxonomy_id is a unique ID for the term + taxonomy pair. see: What’s the difference between term_id and term_taxonomy_id Still, I think it’s a bit strange to do it this way. Also because I think it doesn´t make sence to … Read more

custom post type for custom talbe

I’m not sure I understand your question, but I think you’re asking how do you create a post from a form thats submitted by a user? These tutorials might help: http://wp.tutsplus.com/tutorials/allow-users-to-submit-images-your-site/ or http://wp.tutsplus.com/tutorials/allow-users-to-submit-to-your-wordpress-site-a-quotes-plugin/ It shows how to create post from a forms input. For the conditional part, if you want them to be logged in … Read more