junichi11 / netbeans-wordpress-plugin

Support for WordPress
http://plugins.netbeans.org/plugin/46542/php-wordpress-blog-cms
Other
91 stars 35 forks source link

Cannot enable WordPress in existing project. #51

Closed ve3 closed 8 years ago

ve3 commented 8 years ago

When I open project properties and go to Frameworks > WordPress. Checked on enable check box. There is error red message.

Existing content directory name must be set.

And I look at Custom content name there is "wp-content" already exists. So, I try to enter path to installed WP in WordPress Root field and got this error red message.

Existing WordPress Root directory name must be set.

I did not use this plugin for very long time and I already forgot how to make it work. The document in this repo front page did not tell anything about this. Currently I cannot enable WordPress in existing project or cannot create new project with WordPress enabled because nothing installed and no error.

junichi11 commented 8 years ago

Can you write your directory structure? (or screenshot)

ve3 commented 8 years ago

For existing project, it is just plugin folder name with included installed WordPress. + automatic copy files to installed WordPress plugin folder for easy testing. Example: C:\projects\myplugin Included folder: C:\projects\WordPress Auto copy from C:\projects\myplugin to C:\projects\WordPress\wp-content\myplugin

For new project, it is just empty folder (new project > new php application).

ve3 commented 8 years ago

OK. I know it now. The WordPress Root field must be relative path only. Cannot use C:\path\to\WP. :P

But to create new empty WordPress project is still not working.

zmni commented 8 years ago

I also have this problem, here screenshot of my dir structure. wp-content

My wp-config custom directory setting:

define( 'WP_HOME', 'https://' . $_SERVER['SERVER_NAME'] );
define( 'WP_SITEURL', 'https://' . $_SERVER['SERVER_NAME'] . '/app' );
define( 'WP_CONTENT_DIR', __DIR__ );
define( 'WP_CONTENT_URL', WP_HOME );
define( 'WPMU_PLUGIN_DIR', __DIR__ . '/includes' );
define( 'WPMU_PLUGIN_URL', WP_HOME . '/includes' );

What should I type on my custom content name? Filling it with dot . doesnt work.

junichi11 commented 8 years ago

OK. I know it now. The WordPress Root field must be relative path only. Cannot use C:\path\to\WP. :page_facing_up:

yes, you have to set the relative path from the source directory.

But to create new empty WordPress project is still not working.

I'm not sure with just it. Can you attach your screenshot? Can you write your exact steps to reproduce it?

junichi11 commented 8 years ago

@zmni

It seems that there are differences between your directory structure and default one.

Where is the wp-content/plugins? Where is the wp-content/themes? Where is the wp-content?

zmni commented 8 years ago

Read my first post, screenshoot is the root and below that is my wp custom directory structure. Ok, this may be explained more clearly.

webroot ---/              -> WP_HOME & WP_CONTENT_(DIR|URL) = wp-content
        ---/app/          -> WP_SITEURL & ABSPATH
        ---/includes/     -> WPMU_PLUGINS_(DIR|URL)
        ---/languages/    -> WP_LANG_DIR
        ---/plugins/      -> WP_PLUGINS_(DIR|URL) = wp-content/plugins
        ---/themes/       -> $theme_root = wp-content/themes
        ---/.htaccess
        ---/index.php
        ---/wp-config.php

As you can see, root directory == wp-content. and when you defined WP_CONTENT_DIR and WP_CONTENT_URL, plugins and themes automatically follow the value.

ve3 commented 8 years ago

Empty new WP project not working.

  1. New project > PHP application
  2. Enter project name and select empty source folder
  3. In PHP frameworks page, checked on WordPress check box
  4. Select Use URL. Tick set format to project & create wp-config.php
  5. Enter db config
  6. Click finish
  7. Empty source folder is still empty and there is no any progress in Netbeans.
junichi11 commented 8 years ago

@zmni

Please try to set the following to your project properties:

Custom content name: .

plugins: plugins

themes: themes

junichi11 commented 8 years ago

@ve3

Thanks! But it is another problem. So can you submit it as a new issue?