Setup PHPStorm to debug symlinked WordPress plugin - php

I'm using Herbert framework to develop a WordPress plugin. It recommends to set up a separate folder on a disk and symlink it to the "/wp-content/plugins/" directory.
I created a project in PHPStorm with a original plugin directory. Then I added "wp-includes" folder as external library to get all the Wordpress.
I also brought up a wordpress integration this way:
Now this is how I tried to configure the server to get this plugin debugged. That isn't working.
Can you guys please help me to debug it?

Related

Install Moodle plugin into root directory or redirect it

I'm in the process of programming my own static pages in moodle. It works so far, but I have the whole thing running in the local environment in its own folder in the root directory "mymoodle.com/folder/".
Now I would like to install it as a plugin on the stable instance via the dashboard/frontend, but if I understand it correctly then only works with the available plugin types => path from the docu
Is that only possible via FTP access? Or is a plugin type not listed yet or have I overlooked one?
Is there a better moodle approach than plugin type "local" ?
I have already discovered the "Static Pages" plugin, but I don't really understand how they solve the redirect from /local/staticpage/ to /static/
Local Plugin folder is the best approach, if you are creating a plugin that doesn't comes under any of the other plugin types mentioned here.
However you can shift the folder (and make appropriate changes in files to require files) under the Moodle's root directory and it should work.

Google Cloud App Engine : Custom WordPress theme and plugins missing

Following this official guide and using the flex environment with php 7.2, I am trying to deploy to App Engine with custom plugins and themes.
These themes are not available on wppackagist, given that they are truly custom to my project.
My git repo is correctly saving the custom plugins and themes -- all composer.json based wppackagist plugins are being installed as intended.
However, for the life of me, I cannot get the deploy to include my custom files. I have additionally verified that the image uploaded to AE is the correct version, and it has been promoted to serve all traffic as intended.
Can anyone help me understand the logic that I am missing to ensure that when I deploy my app that the custom plugins and themes are built into the image?
So the answer is to not change the app output folder. Via the CLI install helper, I defined the output folder to wp_app -- it still anticipated app as the folder. Nothing was in the app folder when I created the service as wp_app being the WordPress folder. So, just keep the folder structure as-is and you will be fine.

How Run Wordpress Theme with Netbeans?

Please I need some guides or tuto showing how " run and import " a Theme Based on wordpress in Netbeans.
Thanks a lot.
You can edit a installed WordPress theme in Netbeans using the new project options.
(New Project-->PHP-->PHP Application from Remote Server)
First, the theme must be installed on a webserver that supports mysql, php, and HTTPS. (https://wordpress.org/about/requirements/)

how to find wordpress files on linux installed from bitnami

super frustrated by this problem. I am trying to learn wordpress development and I have been trying for hours to find the files I need such as functions.php but alas I can not find the files
Does anyone know where functions.php and other wordpress files would be on linux installed from bitnami?
I have found /opt/lampp/var/mysql but I can not access it with the permissions it has.
I have tried changing the permissions using chmod but I still can not get into it.
it's under apps/wordpress/
The following is from their readme file.
apache2/: Apache Web server.
varnish/: Varnish Cache
php/: PHP Scripting Language.
mysql/: MySQL Database.
apps/
wordpress/: WordPress application folder
conf/: WordPress Apache configuration files
htdocs/: WordPress PHP application files
phpMyAdmin/: phpMyAdmin application folder (optional)

How to setup Netbeans Project for WordPress Plugin/Widget Development

I am wanting to locally develop a suite of WordPress plugins and widgets. My development environment consists of Windows v8.1, Netbeans v8.0.2 and XAMPP v5.6.3.
I've configured Netbeans and PHP to use XDebug. I've spent the entire weekend watching and reading various tutorials on setting up Netbeans IDE for developing a WordPress plugins/widgets.
Everything seems to be working at this point - I've been able to create new Netbeans projects by opening existing/installed plugins of my WordPress install. I am able to set breakpoints and trace through code. All seems to be working well, but I am puzzled regarding the 'proper' way to setup a new project.
Should a plugin/widget project somehow include the WordPress core files starting at .\htdocs, or should the root of the project be .\htdocs\wp-content\plugins\myplugin? In other words, should I be able to see .\wp-admin and .\wp-includes in my project tree?
My thinking is that Netbeans needs to somehow be able to read the core WordPress files to provide function reference during development of the plugin/widget and this would require including the WordPress core in my project, somehow.
Maybe my question is best asked this way:
What should the root project folder be set to for developing/debugging a plugin named MyPlugin?
and/or:
How are WordPress core files included/referenced in the MyPlugin project?
Anyone have a good step-by-step reference that would enlighten me on this?
I'm searching for this too, but here's how I set it up. I'm developing a theme (plugin would be analogous) so I have the theme source and NetBeans project files in a separate folder outside of WordPress folder, and outside of the xampp/htdocs actually. Then, I set the root of my PHP project to this theme source folder, and then using the Project Properties -> Include Path facility to allow NetBeans to include the WordPress folder, it will appear under Include Path in Project Explorer, enabling 'IntelliSense' etc. This way you can start a new NetBeans project per plugin/theme, basically, just including the WordPress core in each. Furthermore, I have NetBeans set up to copy the source files to the xampp\htdocs\mysite2\wp-content\themes\ folder on save and project load (set up in preferences). Here's a pic: NetBeans WordPress Setup
The best way I've found so far is to use a hardlink.
If I keep the files in Netbeans' project directory everything works. But Wordpress sometimes does not recognize that the theme is there. I.e. in some wp-admin menu's. But I'm able to display a Theme just fine.
I create the project as a php project in Netbeans.
Then link my (pubic html) folder from the Netbeans directory.
mklink /J C:\LinkToFolder C:\Users\Name\OriginalFolder
Use " quotes if your path has spaces
I use:
mklink /J "C:\xampp\htdocs\wptheme\wp-content\themes\themename"
"C:\Users\Probook 1\Documents\NetBeansProjects\projectname\public_html"
Then I setup the netbeans project to load an external page when I run the project. (See File => Project Properties=>Run Configuration)
I'll be looking into doing the same with plugins soon. Practically I can't see a reason this won't work for plugins too.
I want to try and see if Netbeans copes with the hardlink better than Apache does. (I.e. if I setup the project first then move the files to Xampp and create a hardlink in Netbeans' project directory. I.e. Projectname\public_html
(If anyone does it first let me know how it goes)
It's more important to me that Netbeans can backup and function. As long as I can display what I'm developing realtime.
AFAIK Netbeans can intergrate with Xampp to run it's debugging (Xdebug)

Categories