WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MySQL permissions (4 posts)

  1. jamiesonteo
    Member
    Posted 5 years ago #

    Hi folks,

    Can't seem to find any article on the proper privileges for the wordpress mysql user. I can see from the doc it says "Grant All" privileges but surely this is not safe right? What are the exact rights that are is needed from WP to function without granting unnecessary privileges?

    Thanks

  2. whooami
    Member
    Posted 5 years ago #

    INSERT statements
    UPDATE statements
    DELETE statements
    CREATE tables
    DROP tables

    -- and probably an ALTER as well.

  3. NC@WP
    Member
    Posted 5 years ago #

    GRANT ALL is necessary. The need to have SELECT, INSERT, UPDATE, and DELETE privileges is obvious; that's how WordPress displays, stores, and manages content and settings. ALTER privilege is critical for upgrades (sometimes, new versions of WordPress and/or plugins need to change table structure). CREATE TABLE privilege is required for initial install of both WordPress and plugins that maintain their own data tables. DROP TABLE privilege is needed for plugins to uninstall themselves completely.

  4. nicka
    Member
    Posted 5 years ago #

    Just came across this thread.
    im installing wp on fasthosts and according to their documentation i cannot grant ALL permissions. Are the following that they do allow sufficient?

    Using the SSH command-line, you can grant the following permissions to MySQL database users on our shared hosting platform:
    ALTER
    CREATE
    CREATE TEMPORARY TABLES
    DELETE
    DROP
    INDEX
    INSERT
    LOCK TABLES
    SELECT
    UPDATE

    The permissions that you cannot grant are:
    ALL
    FILE
    PROCESS
    RELOAD
    SHOW DATABASES

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.