Adding profile data to database

To show extra fields in profile, use this hook: function myplugin_show_profile_extra_fields( $user ) { // echo your extra fields here } add_action( ‘show_user_profile’, ‘myplugin_show_profile_extra_fields’ ); add_action( ‘edit_user_profile’, ‘myplugin_show_profile_extra_fields’ ); And to save extra fields use following hook: function myplugin_save_profile_extra_fields( $user_id ) { if ( !current_user_can( ‘edit_user’, $user_id ) ) { return false; } update_usermeta( $user_id, … Read more

Theme Options – localhost to new url

The way I’ve always migrated sites is not by search and replacing, but just by changing two fields in wp_options: siteurl and home. Try doing only this, no search and replace, and see if it fixes your options page / widgets. It may be that by replacing all instances of “localhost,” you’re actually impairing your … Read more

Importing Concrete5 content to WordPress

If you go to WordPress’s Tools » Import page in your site’s Admin section (eg, http://example.com/wp-admin), you’ll find that it can import, among other things, HTML pages. So if you have a way to export your Concrete5 site to a directory of HTML pages, you should be able to import them that way.

SQL Database Lost

You should be able to restore the database by simply copying those files into the DB folder. (e.g., /var/lib/mysql/dbname). Typically there is a FRM file included as well.

SQL command to export post_content from wp_posts using phpMyAdmin

Use This Script <?php $servername = “localhost”; $username = YOUR_USER; $password = YOUR_PASSWORD; $dbname = YOUR_DB_NAME; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die(“Connection failed: ” . $conn->connect_error); } $a1 = ($_GET[‘id’]); $sql = “SELECT post_content FROM `wp_posts` where ID=’$a1′”; $result = $conn->query($sql); if ($result->num_rows > … Read more

database search feature

If you want to use WordPress you can download a custom post type plugin (such as Custom Post Type UI), create your Book post type; another plugin to generate your form for adding books (Gravity Forms + this looks good, or a similar solution, or create a form by hand). Then tweak the default WordPress … Read more

Recover Same WordPress Admin Password

In general, no. This is not possible. The password is btw, not encrypted only once, but twice with md5. There are some cases where you type the password to the database, and for the short time, it will not be encrypted at all. 🙂 The very first time the admin authenticate itself again, the password … Read more

cannot log in to the mysql server (wamp and wordpress)

The default Wamp user`s credentials are: username: root password: (empty, nothing, nada) If you already have a WordPress website previously created on your Wamp system, then go to /www/yourlocalsite/wp-config.php and check out the username and password you set. Here`s an example: /** MySQL database username */ define(‘DB_USER’, ‘root’); /** MySQL database password */ define(‘DB_PASSWORD’, ”); … Read more

How to stop WordPress from using utf8mb4_unicode_ci collation

You can filter every database query with the hook query, for example like this: add_filter( ‘query’, function ( $query ) { return str_replace( ‘utf8mb4_unicode_ci’, ‘utf8_unicode_ci’, $query ); }); However, I would strongly recommend not to do this. Update your databases instead. The old utf8_* collations have very annoying limitations, and you will run into plugin … Read more