• ecoalfred

    (@ecoalfred)


    Hi, I am trying to develop a website via WordPress and host in Synology NAS.

    What I have done: I have installed WordPress, Web Station, MariaDB 10, Apache HTTP Server 2.4 in Synology NAS

    Facing issues: I do not know where and how to connect to the database table in MariaDB 10 and how can I edit/update some data/info in the database table via the Website which created by me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • kprajapati22

    (@kprajapati22)

    Connect WordPress to MariaDB 10:

    • To connect database in WordPress, you need to edit wp-config.php
    define('DB_NAME', 'wordpress_db'); // The name of the database
    define('DB_USER', 'wp_user'); // Your MariaDB username
    define('DB_PASSWORD', 'password'); // Your MariaDB password
    define('DB_HOST', 'localhost'); // Usually 'localhost'

    Edit Database Tables via WordPress:

    • Use a database management plugin, phpMyAdmin, Adminer or custom code using the $wpdb object.
    Thread Starter ecoalfred

    (@ecoalfred)

    Hi @kprajapati22 , thanks for your sharing.

    After these, how can I edit/update some data/info in the database table via the Website which created by me?

    kprajapati22

    (@kprajapati22)

    There are multiple ways but can you please let me know what info/data you want to update, based on that I can share further information

    Hello @ecoalfred as per your requirement please follow bellow steps.
    To connect your WordPress website to the MariaDB 10 database on Synology NAS, follow these steps:

    [1] Create a Database in MariaDB 10:

    Access phpMyAdmin via Synology to create a database for WordPress.

    Go to phpMyAdmin (available in Synology’s package center), and under MariaDB 10, create a new database.

    [2] Configure WordPress to Connect to MariaDB:

    During WordPress installation, you’ll be prompted to enter the database details. Use the database name, username, password, and localhost (or your Synology IP) as the database host.

    If WordPress is already installed, edit the wp-config.php file in your WordPress directory to include the correct database credentials:

    define(‘DB_NAME’, ‘your_database_name’);

    define(‘DB_USER’, ‘your_username’);

    define(‘DB_PASSWORD’, ‘your_password’);

    define(‘DB_HOST’, ‘localhost’); // Or you can use Synology NAS IP

    [3] Update/Edit Data in the Database via the Website:

    Use the WordPress admin dashboard to manage content, or for custom database interactions, you can create custom plugins or use a database management plugin like WP phpMyAdmin to interact directly with the database tables. This will connect your website to MariaDB, and allow you to manage the database from within WordPress or Synology’s phpMyAdmin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.