wordpress-core icon indicating copy to clipboard operation
wordpress-core copied to clipboard

composer install wpackagist theme in wrong folder

Open celtic34fr opened this issue 3 years ago • 2 comments

Hi all,

I'm testing metabolism/wordpress-bundle-demo (latest issue with johnpbloch/wordpress-core: 5.8), and trying to install plugins and themes with composer. For plugins, it will be installed in public/wp-bundle/plugins, as configured in the composer.json file. But for the themes, I will create a new folder at the root of the project 'wp-content/themes / ...' with the new theme. I am under linux (Ubuntu 21.04 desktop edition) and to have the good behavior in the administration area, I must make a symbolic link to have the same operation as on the wordpress site. where I had to do: 1 / I copy the wp-content/themes folder to public/edition/wp-content/themes 2 / delete the themes folder in wp-content/ and replace it with a symbolic link from public/edition/wp-content/themes 3 / I copy the content of public/wp-bundle/plugins in public/edition/wp-content/plugins, and after deleting the plugins folder in public/wp-bundle 4 / create 2 symbolic links in public/wp-bundle from public/edition/ wp-content/plugins and public/edition/wp-content/themes Then everything works fine, but it's so much work to get this result.

  • Is it possible to configure the right folder for installing themes by composer, and by wordpress too?
  • Which folder between public/edition/wp-content/plugins and public/wp-bundle/plugins is the correct one in your installation? Can we then have the correct settings?
  • Why in the administration area, in the Appearance menu, we do not find the management of themes (present in the sources public/edition/wp-admin/themes.php), like the customization of the active theme (present in the sources public/edition/wp-admin/customize.php)

Thank you in advance for your answer

Celtic34fr Beziers - France

celtic34fr avatar Aug 31 '21 11:08 celtic34fr

You can configure it in composer.json.

"extra": {
    "wordpress-install-dir": "core",
    "installer-paths": {
      "content/mu-plugins/{$name}/": [
        "type:wordpress-muplugin"
      ],
      "content/plugins/{$name}/": [
        "type:wordpress-plugin"
      ],
      "content/themes/{$name}/": [
        "type:wordpress-theme"
      ]
    }
  }

loxK avatar Aug 09 '23 03:08 loxK

this the 'extra' configuration that i use without any problems in Wordpress Administration : "extra": { "symfony": { "allow-contrib": false, "require": "5.2.*" }, "installer-paths": { "public/wp-bundle/mu-plugins/{$name}/": [ "type:wordpress-muplugin" ], "public/wp-bundle/plugins/{$name}/": [ "type:wordpress-plugin" ], "public/wp-bundle/themes/{$name}/": [ "type:wordpress-theme" ], "public/edition/": [ "type:wordpress-core" ] } } With this configuration, I can manage plugins and themes directly in Wordpress Administration without use packages to install plugins or theme.

celtic34fr avatar Nov 24 '23 09:11 celtic34fr