• Hello every one
    I want to install a script in my network wordpress in one of my subdirectory site not all of my sites
    Also my host has one database and I cant`t use another database to use it.
    Is there way to do that?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    WP network only utilizes one DB. You can even have multiple WP installations (single or network) within a single DB if each installation has its own unique table prefix (set in wp-config.php).

    What sort of script? JavaScript? Actually, probably doesn’t matter. Create a custom plugin that utilizes your script. If it’s JavaScript, its files should be enqueued in PHP with wp_enqueue_script(). Network install your plugin after uploading its files via FTP. Only activate the plugin on the site where it is to be used.

    If your script also utilizes a DB, its tables can reside in the same DB as WP. Just be sure there is no table name conflict. Your PHP (as a plugin) can access the WP DB through the global $wpdb connection object, using its methods to run DB queries.

Viewing 1 replies (of 1 total)

The topic ‘installing script in network wordpress( subdirectories)’ is closed to new replies.