Tag: WordPress

  • WordPress 6.7 Now Available

    WordPress 6.7 debuts the modern Twenty Twenty-Five theme, offering ultimate design flexibility for any blog at any scale. Control your site typography like never before with new font management features. The new Zoom Out feature lets you design your site with a macro view, stepping back from the details to bring the big picture to life.

    Read more: https://wordpress.org/news/2024/11/rollins/

    WordPress 6.7 Now Available
  • Things that will never die…

    PHP, Ubuntu Desktop, and WordPress… and I’m perfectly happy with that.

    Fight me.

  • Code Block Pro adds tags to my posts

    Kind of lame. I don’t like it when plugins add fluff to my content/website. Aside from mentioning it here, I may submit a ticket for this to find out if it’s a bug or feature.

  • Saturday morning vibe…

    Cleaning up some personal projects and performing some maintenance on some personal deployments.

  • Reblog: Site Editor Tools

    The Site Editor gives you a powerful way to visually create every part of your site and tell your story.

    Reblog: Site Editor Tools
  • How-to Backup a WordPress Website Using WP-CLI

    Backing up a WordPress website using WP-CLI (WordPress Command Line Interface) involves several steps. Here’s a general guide on how to do it:

    1. Install WP-CLI

    If you haven’t already installed WP-CLI, you’ll need to do so. You can find the installation instructions on the WP-CLI’s official website.

    2. Access Your Server

    You’ll need SSH access to your server. Once you’ve logged in, navigate to the root directory of your WordPress installation.

    3. Backup the Database

    To backup your WordPress database, use the following WP-CLI command:

    wp db export

    This command will create a .sql file in your WordPress directory. This file contains all of your WordPress database information.

    4. Backup WordPress Files

    You also need to backup your WordPress files, including themes, plugins, and uploads. To do this, you can use a command like rsync or tar. For example:

    tar -czvf yoursite_backup.tar.gz /path/to/your/wordpress/directory

    This command will create a compressed archive of your WordPress directory.

    5. Download the Backup

    After creating the backup files on your server, you’ll need to download them to a safe location. You can use an FTP client or a command like scp for this purpose.

    6. Automating the Process

    Optionally, you can write a script to automate the backup process and schedule it to run regularly using a cron job.

    Important Tips

    • Test Your Backup: Always test your backups to ensure they work as expected.
    • Secure Your Backup: Keep your backup files in a secure location to prevent unauthorized access.
    • Regular Backups: Schedule regular backups to minimize the risk of data loss.

    Remember, while WP-CLI is a powerful tool, you should be comfortable with command-line interfaces and have the necessary permissions on your hosting server to perform these actions.

    How-to Backup a WordPress Website Using WP-CLI
  • WordPress: How to manually create a user in the database

    Manually creating a WordPress user in the database involves adding a new entry to the wp_users table and assigning the necessary user capabilities. Here are the steps to do this:

    Please exercise caution when making direct changes to your WordPress database, as incorrect changes can break your site. Make sure to back up your database before proceeding.

    1. Access Your Database:
      Log in to your server or hosting provider’s control panel and access the phpMyAdmin or a similar tool to manage your WordPress database.
    2. Find the wp_users Table:
      In phpMyAdmin, look for your WordPress database on the left-hand side and click to select it. Then, find and click on the wp_users table.
    3. Insert a New User:
      Click the “Insert” or “Add” tab (the exact label may vary depending on your phpMyAdmin version). This will open a form for adding a new row to the wp_users table.
    4. Fill in User Information:
      Fill in the following fields for the new user:
    • user_login: Enter the desired username for the new user.
    • user_pass: Generate a secure password hash. You can use online tools to create password hashes or use WordPress’s built-in wp_hash_password function. Make sure to select the MD5 option when entering the password hash.
    • user_nicename: This can be the same as the user_login.
    • user_email: Enter the email address for the new user.
    • user_registered: Set the registration date in the format “YYYY-MM-DD HH:MM:SS”.
    • display_name: The display name for the user.
    1. Insert the User:
      Click the “Go” or “Insert” button to insert the new user into the wp_users table.
    2. Assign Capabilities:
      To assign capabilities to the user, you’ll need to find the user’s ID in the wp_users table (it’s typically an auto-incremented number) and then add an entry in the wp_usermeta table.
    • Go to the wp_usermeta table.
    • Insert a new row with the following values:
      • user_id: The ID of the new user from the wp_users table.
      • meta_key: Enter wp_capabilities.
      • meta_value: Insert a serialized array with the user’s capabilities. For example, to make the user an administrator, you can use a:1:{s:13:"administrator";b:1;}.
    1. Login to WordPress:
      You should now be able to log in to your WordPress site using the credentials you provided.

    Please be extremely careful when making changes directly to the database, and ensure that you have a backup in case anything goes wrong. It’s recommended to use the WordPress admin interface to create and manage users whenever possible to avoid potential issues.

    WordPress: How to manually create a user in the database
  • Update WordPress MySQL tables from old domain name to new domain name

    This code is typically used when migrating a WordPress site from one domain to another, ensuring that all references to the old domain are updated to the new domain.

    /*
    This SQL code block updates various tables in a WordPress database to replace occurrences of the 'Old_Domain_Name' with the 'New_Domain_Name'. The specific tables being updated are:
    - wp_options: Updates the option_value column for rows where the option_name is 'home' or 'siteurl'.
    - wp_posts: Updates the post_content column.
    - wp_postmeta: Updates the meta_value column.
    - wp_usermeta: Updates the meta_value column.
    - wp_links: Updates the link_url column.
    - wp_comments: Updates the comment_content column.
    */
    
    UPDATE wp_options SET option_value = replace(option_value, 'Old_Domain_Name','New_Domain_Name') WHERE option_name = 'home' OR option_name = 'siteurl';
    
    UPDATE wp_posts SET post_content = replace(post_content, 'Old_Domain_Name','New_Domain_Name');
    
    UPDATE wp_postmeta SET meta_value = replace(meta_value,'Old_Domain_Name','New_Domain_Name');
    
    UPDATE wp_usermeta SET meta_value = replace(meta_value, 'Old_Domain_Name','New_Domain_Name');
    
    UPDATE wp_links SET link_url = replace(link_url, 'Old_Domain_Name','New_Domain_Name');
    
    UPDATE wp_comments SET comment_content = replace(comment_content , 'Old_Domain_Name','New_Domain_Name');
    Update WordPress MySQL tables from old domain name to new domain name
  • Updated website to TT4

    I’m vibing on the updated default theme, Twenty Twenty-Four. Great job to the contributors!

    winding road photography
    Photo by Johannes Plenio on Pexels.com
    Updated website to TT4
  • ActivityPub, Friends, and WP Code plugins

    I’m trying out the ActivityPub and Friends WordPress plugins on this website. Also, using the WP Code plugin to add the following snippet of code, site wide.

    ActivityPub, Friends, and WP Code plugins