• Hello,

    I am WordPress Multistite. I have 2 sites – primary and subsite. When I FTP using the Key file, I FTP to the primary site.

    Now to edit functions.php for either site, I have two possibilities:

    1. WordPress site Dashboard and edit the same using Appearnce –> Editor.
    But the same is not available on a Network site.
    2. FTP to primary site. Where is the Functions.php for the Subsite?

    If functions.php is same for both sites, how to edit per site?

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    Instead of doing that, use a functionality plugin, like https://ww.wp.xz.cn/plugins/code-snippets/

    Joy

    (@joyously)

    The whole point of a multisite is to use one WordPress installation (one set of WordPress files) to serve multiple sites, each having their own database.
    That means that you can install a theme once, and it can be used many times. You should not be editing functions.php through the dashboard. When you do this, not only are you at risk of losing the changes on theme updates, you don’t have a local copy to recover the changes.

    Thread Starter Anandabrata Ghosh

    (@ananddevops)

    @macmanx Thank you for introducing me to the same. I will explore the same and reach back for futher queries.

    @joyously That is a very good point your bring out. I have been querying this for a while.

    multiple sites, each having their own database

    All these databases are in the same server, but are they in different schemas? Either way how does one get to share the data from one to the other, like the Super Admin? And is there a code sample for the same?

    Thanks

    Joy

    (@joyously)

    Thread Starter Anandabrata Ghosh

    (@ananddevops)

    @joyously Thank you so much

    1. My query for database is explained well by the 2nd link
    2. As for the sharing of data arise, it gives one option – link
    And it is helpful. Although I would like to know more indepth and standard wordpress ways for the same. Since we are in the same discussion, I am enquiring – Is there anything on codex wrt same.

    Joy

    (@joyously)

    The point of multisite is that the sites are separate but served by one WordPress installation. So how would you normally share data from separate sites?
    There are functions to switch between sites, and there are plugins that do this. You have to search the plugin directory with “multisite” or “network” and whatever functionality you need.
    Use the search box in the header here and it will search forums, developer docs, plugins.

    Thread Starter Anandabrata Ghosh

    (@ananddevops)

    @joyously Rephrasing – What I wanted to ask was how to sync data from one site to another in a multisite. Not share but sync – like copy, live synching back and forth, etc.

    I really appreciate the resources shared and will do a further read.

    Thanks

    gibsongk55

    (@gibsongk55)

    Thanks for the tips!

    • This reply was modified 7 years ago by gibsongk55.
    • This reply was modified 7 years ago by gibsongk55.
Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘How to edit functions.php for sites?’ is closed to new replies.