Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer install wpackagist theme in wrong folder #30

Open
celtic34fr opened this issue Aug 31, 2021 · 2 comments
Open

composer install wpackagist theme in wrong folder #30

celtic34fr opened this issue Aug 31, 2021 · 2 comments

Comments

@celtic34fr
Copy link

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

@loxK
Copy link

loxK commented Aug 9, 2023

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"
      ]
    }
  }

@celtic34fr
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants