• Resolved brpsycho

    (@brpsycho)


    Hello

    I’m pretty new to WordPress. I’ve been asked to use this plug-in for publication for a website where they have a multi-site language translation (that is, they have one site in each language). I’ve read this this question and it looks like it’s precisely what I want; I’d like all my publications in the database to be shared between all the sites… But how can I accomplish this ? I’ve tried removing all the “$wpdb->prefix . ” from the teachpress.php file but it looks like it’s not the right thing as I can’t import my publications anymore.

    Thank you. Apart from my current problem, this plug-in seems pretty great in my opinion.

    • This topic was modified 9 years, 6 months ago by brpsycho.
Viewing 1 replies (of 1 total)
  • Plugin Author winkm89

    (@winkm89)

    Hi,

    It’s simplier as it’s look like. 🙂

    The plugin uses normally the dynamic wpdb_prefix for database tables, so each multisite has there own tables. If you want to use one teachPress database for all multisites, then you can define that in the wp-config.php. Here is a step-by-step-guide:

    1. Look in phpmyadmin for the prefix of the existing teachPress tables you want to use. In our example it’s “wp_” (That’s also the standard WordPress prefix)
    2. Now add the following lines to the wp-config.php of your WordPress installation:

    
    define('TEACHPRESS_ARTEFACTS', 'wp_teachpress_artefacts');
    define('TEACHPRESS_ASSESSMENTS', 'wp_teachpress_assessments');
    define('TEACHPRESS_STUD', 'wp_teachpress_stud');
    define('TEACHPRESS_STUD_META', 'wp_teachpress_stud_meta');
    define('TEACHPRESS_COURSES', 'wp_teachpress_courses');
    define('TEACHPRESS_COURSE_META', 'wp_teachpress_course_meta');
    define('TEACHPRESS_COURSE_CAPABILITES', 'wp_teachpress_course_capabilites');
    define('TEACHPRESS_COURSE_DOCUMENTS', 'wp_teachpress_course_documents');
    define('TEACHPRESS_SIGNUP', 'wp_teachpress_signup');
    define('TEACHPRESS_SETTINGS', 'wp_teachpress_settings');
    define('TEACHPRESS_PUB', 'wp_teachpress_pub');
    define('TEACHPRESS_PUB_META', 'wp_teachpress_pub_meta');
    define('TEACHPRESS_PUB_CAPABILITES', 'wp_teachpress_pub_capabilites');
    define('TEACHPRESS_PUB_DOCUMENTS', 'wp_teachpress_pub_documents');
    define('TEACHPRESS_TAGS', 'wp_teachpress_tags');
    define('TEACHPRESS_RELATION', 'wp_teachpress_relation');
    define('TEACHPRESS_USER', 'wp_teachpress_user');
    define('TEACHPRESS_AUTHORS', 'wp_teachpress_authors');
    define('TEACHPRESS_REL_PUB_AUTH', 'wp_teachpress_rel_pub_auth');

    That’s all. The good thing is, that an plugin update can’t override this settings. You must only add new table names, if teachPress introduce new tables. In this example I have added the names for teachPress 6.0 already. So, the next tables come possibly with teachPress 7.0 😉

Viewing 1 replies (of 1 total)

The topic ‘Multisite teachpress’ is closed to new replies.