Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey @ddx2

    Let’s say you have three websites

    • example.com – The Main Site
    • example.com/site2 – The Site 2
    • example.com/site3 – The Site 3

    If you want the content of example.com/site2 show as the main site with example.com domain, you need to change the domain name that is pointed in the database.

    • In wp_blogs table , swap the domain and path.

    Update the wp_options table.

    • Search siteurl and home and change the URL there.

    Update the domain in the wp_site table.

    Now in the network admin dashboard, the tag of the main site, if you want to change that, you have to make changes in the wp-config.php file.

    • Search define( 'BLOG_ID_CURRENT_SITE', 1 ); and replace 1 with the blog ID that you want to show as the main site.

    Make sure to backup your data.

    Hey @ddx2, can you please tell me what kind of multisite you have, subdomain or subdirectory ?

    Could you share the screenshot of wp_site and wp_blogs table, if possible ?

    • This reply was modified 4 hours, 1 minute ago by Ritik Tiwari.
    Ritik Tiwari

    (@theritiktiwari)

    Hey @ddx2, you can follow the below steps

    Step 1: First backup all your files and database.

    Step 2: Now set the site you want as primary site

    • Access the database and change the name of the tables.
    • The main table should have a blog_id = 1, which you can find on wp_blogs.

    Step 3: Update the wp_site and wp_sitemeta table

    • Update domain and path for your multisite network, and it should reflect the new main site in wp_site table.
    • Look for the meta key site_admins and ensure that the admin user(s) for the new main site are listed in the wp_sitemeta table.
    Ritik Tiwari

    (@theritiktiwari)

    Hey @dffgraphics

    You can check for Plugins Modifying the Order, some plugins may interfere with the post order. For example, plugins that customize post order (like a post reorder plugin or post grid plugins) can override the default behavior.

    If no plugin installed and issue still persist, you can also install Post Type Order plugin and reorder the post accordingly.

    Ritik Tiwari

    (@theritiktiwari)

    You can try to disable the email with the help of this plugin.

    Ritik Tiwari

    (@theritiktiwari)

    Hey @orchardpost, you should try the following steps to troubleshoot the issue:

    1. Verify MAMP MySQL Settings: By default, MAMP uses root as both the username and password for MySQL, but you need to confirm these settings:

    • Open MAMP and go to Preferences > Ports:
      • Ensure the MySQL port is set to 8889 (default for MAMP).
    • Open phpMyAdmin by navigating to https://localhost:8888/phpMyAdmin in your browser:
      • Try logging into phpMyAdmin using the following credentials:
        • Username: root
        • Password: root
      If you can log into phpMyAdmin, then the MySQL server is running, and the credentials are correct.

    2. Check the MySQL Port: MAMP uses a non-standard port for MySQL, which might be causing the connection issue. By default, it’s 8889, not the usual 3306.

    • When setting up WordPress, the Database Host should be localhost:8889 instead of just localhost.

    3. Edit the wp-config.php File Manually: During the WordPress setup process, you can configure the wp-config.php file yourself to ensure the database connection details are correct.

    • After getting the error, WordPress will ask you to manually configure the wp-config.php file.
    • Navigate to the folder where you installed WordPress (C:\MAMP\htdocs\wordpress).
    • Open the wp-config-sample.php file in a text editor and save it as wp-config.php after editing.Modify the following lines to match your MAMP configuration:
    /** The name of the database for WordPress */
    define( 'DB_NAME', 'wordpress' );

    /** MySQL database username */
    define( 'DB_USER', 'root' );

    /** MySQL database password */
    define( 'DB_PASSWORD', 'root' );

    /** MySQL hostname */
    define( 'DB_HOST', 'localhost:8889' );
    • Make sure the DB_HOST is set to localhost:8889 (or whichever port your MAMP MySQL server is using).

    4. Test Database Connection: You can create a simple PHP script to test whether WordPress can connect to the database. Create a file called dbtest.php in your C:\MAMP\htdocs\wordpress folder with the following code:

    <?php
    $servername = 'localhost:8889';
    $username = 'root';
    $password = 'root';

    // Create connection
    $conn = new mysqli( $servername, $username, $password );

    // Check connection
    if ( $conn->connect_error ) {
    die( 'Connection failed: ' . $conn->connect_error );
    }
    echo 'Connected successfully';
    ?>
    • Go to your browser and visit https://localhost:8888/wordpress/dbtest.php.
    • If it shows “Connected successfully”, then the database connection is fine. If not, there is still an issue with the database settings (likely related to the port or credentials).
    Ritik Tiwari

    (@theritiktiwari)

    Hey @sofiahz, you can try disabling the admin notifications for that

    function custom_disable_reset_password_notification( $user_id, $new_pass ) {
    // Unhook the default email notification for password changes
    remove_action( 'after_password_reset', 'wp_password_change_notification' );
    }
    add_action( 'after_password_reset', 'custom_disable_reset_password_notification', 10, 2 );
    Ritik Tiwari

    (@theritiktiwari)

    Hey @janne418, if you have access of CLI, follow the steps

    Step 1: Access the server via SSH

    ssh your-username@your-server-ip

    Step 2: Navigate to the WordPress Directory (usually within /var/www/html or a similar directory)

    cd /path/to/wordpress

    Step 3: Get the list of all the users

    wp user list

    Step 4: Select the user for which you want to change the email address

    wp user update <user_id> --user_email="<new_email>"

    Step 5: Verify that email has been changed (this will return the new email ID)

    wp user get <user_id> --field=user_email

Viewing 8 replies - 1 through 8 (of 8 total)