wesleytodd / YeoPress

A Yeoman generator for WordPress
Other
1.08k stars 161 forks source link

Generator hangs after wrong credentials #11

Closed pzi closed 11 years ago

pzi commented 11 years ago

I chose the following

[?] URL WordPress will be installed at (ex. example.com):  client.local
[?] WordPress Version:  (3.5.1)
[?] Table prefix:  (wp_)
[?] Database host:  (localhost)
[?] Database name:  client-www
[?] Database user:  root
[?] Database password:  1234
[?] Use Git?  (Y)
[?] Would you like to install WordPress as a submodule?  (N) n
[?] Would you like to install WordPress with the custom directory structure?  (N)
[?] Install a custom theme?  (Y)
[?] Destination directory (ex. twentytwelve):  client
[?] Theme source type (git/tar):  (git)
[?] GitHub username:  (wesleytodd)
[?] GitHub repository name:  (YeoPress)
[?] Repository branch:  (template)

----------------------------
WordPress URL: http://client.local
Database table prefix: wp_
Database host: localhost
Database name: client-www
Database user: root
Database password: 1234
WordPress install directory: .
WordPress content directory: wp-content
Initialize a Git repo: Yes
Install WordPress as a Git submodule: No
Theme install directory: wp-content/themes/client

Using MAMP on Mac OSX 10.8.3.

MySQL config Host: localhost Port: 3306 User: root Password 1234

In the middle of the generating the site I get this:

create xmlrpc.php
Database does not exist, or crendetials are wrong!
Make sure you create the database and update the credentials in the wp-config.php
Setting Permissions: 0755 on .
Setting Permissions: 0775 on wp-content
create wp-config.php

And after everything else is done it will hang itself after the "All Done!!" message.

Also, when I then visited http://client.local/ the install was pointing to the wrong directory/file.

Hope this helps. Let me know if I can provide any other information.

Cheers @pzi

pzi commented 11 years ago

Also, from the youtube video, it seems there should be 4 commits at the end of the install. I only have 2, the 'initial commit' and 'setup wordpress' ones.

wesleytodd commented 11 years ago

I'm out of town, but as per the other open issue, this is a known issue with yeoman. The generator worked fully if you got to the all done message. When I am back in town next week I will get things all fixed up.

wesleytodd commented 11 years ago

Also, that message in the middle about the database not existing is because of the same issue in yeoman. But it shouldn't cause any issues, it just checks before automatically activating the theme.

pzi commented 11 years ago

ok, no worries. thanks for getting back to me @wesleytodd.

wesleytodd commented 11 years ago

No problem @pzi. Thanks for using Yeopress and reporting the bug! Let me know if you have any recommendations for improvements or features.

pzi commented 11 years ago

You're welcome @wesleytodd. To be honest I have changed quite a lot. I am currently developing a WP theme here at http://www.thefrontiergroup.com.au and we work with HAML/SASS/CoffeeScript given that we do a lot of Ruby/Rails work. So, I ended up refactoring things to fit it into the way we work:

    clean:
      production: ["#{BUILD_PATH}"]
      dev: ["images", "css"]

    copy:
      production:
        files: [
          expand: true
          filter: "isFile"
          src: ["*", "!*.coffee", "!*.json", "!*.md"]
          dest: "#{BUILD_PATH}"
        ]
      dev:
        files: [
          expand: true
          filter: "isFile"
          cwd: "#{DEV_PATH}/images/"
          src: ["**"]
          dest: "images/"
        ]
  grunt.registerTask "assemble", [
    "clean:dev"
    "compass:dev"
    "coffee:compile"
    "jshint"
    "copy:dev"
    "livereload-start"
    "regarde"
  ]

That is a quick summary of what I did so far. Obviously this is very specific for our workflow and may not apply to everyone else. Also, this was the first time I personally worked with grunt/bower so there is probably still a lot of room for improvements.

Maybe this helps you. The only thing that I really think could be adopted is having a dev build and a production build that can be taken, zipped and uploaded straight away, without thinking about anything further.

Regards @pzi

wesleytodd commented 11 years ago

I actually wrote a version early on that used a created a production theme. The issue that I saw is that it meant moving the gruntfile out of the theme. Which would dictate a more structured workflow making it hard to use a custom theme structure without having to make tons of changes. From all of the feedback I have been getting though, people would rather do it that way. So I have been working on this idea a bit again.

Also, since I don't work with coffeescript or haml I have not integrated them into the default theme. But if you feel like helping out, I would love if someone who does use them could whip up a pull request. I would merge it for sure.

wesleytodd commented 11 years ago

To be clear, I didn't mean changing the gruntfile, just adding plain old javascript grunt configuration for those tasks.

wesleytodd commented 11 years ago

Also, when you deploy, are you using git? Or just ftp'ing up a theme? Because I find that I am never manually deploying a theme anymore. I am just running git pull on the whole site. I think that is why the build directory thing isn't as important to me.

pzi commented 11 years ago

How I have set it up now is:

I have pulled wordpress into it's on folder eg. ~/sites/wordpress/. Then, inside the theme folder I have a symlink to my theme which sits in it's on git repository (eg. ~/sites/mytheme/). I don't need to commit the whole wordpress theme as I consider as a stable and I can update it independently.

All I want to work on is that current theme basically. So, it may not be best practice, but I have my theme folder looking like this for now:

/app/
/js/
/node_modules/
.bowerrc
.gitignore
Gruntfile.coffee
package.json
bower.json
....theme files

So you see I have the gruntfile in my theme folder. That is why the copy production task excludes .coffee and .json files. That are not needed on the ftp server.

However, this has to be taken with a grain of salt as I just have started using this method of working (yeoman, grunt and bower). I really like it so far.

Also, yes, I can do a pull request that throws in these kind of things. Although we ended up not using haml as there is no good way to do it afaik, mixing haml / php.

Finally, I forgot to add that I use grunt-contrib-compass, but that requires Ruby and Compass gem installed locally (as on the macosx ruby (1.8.7)).