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/)
Related
I have been doing some research on editing WordPress sites locally and found that PhpStorm is one of the best IDE's out there for this.
The problem I am having is that after downloading my entire WordPress site to my local machine I am unable to even find an option to import it and run it in PhpStorm. I am also struggling to find comprehensive tutorials out there for this so I would appreciate it if someone can at least point me in the right direction so that I can start making progress.
JetBrains has already written a very comprehensive documentation on how to get started with WordPress in PhpStorm.
Documentation Link : https://www.jetbrains.com/help/phpstorm/preparing-to-use-wordpress.html
This is the most useful part for you Download and install WordPress but I would recommend to go through the doc in its entirety.
To run WordPress you will have to setup a local development server. You can use the following.
Laragon
XAMPP
Local by flywheel (Its pro version is free now.)
Being new to Wordpress development ecosystem have few queries which I m stumbled upon currently.
Have installed wordpress and it was working as expected. Had installed a theme to the website recently to the local working copy. Also, added 2 more members to the team which was previously single person and thus made the code version controlled with bitbucket server repository.
Now, the issue is when the new developers cloned the remote repository to their local machine ( entire wordpress with installed theme ) is available. But its not working properly as the new pages/links/menus/images added are not reflecting for the other's local .
Would like to know the general thumbrules which needs to be followed while version controlling Wordpress. Is the added themes/additional code changed files etc. only need to be version controlled instead of the whole Wordpress files? In my scenario what would be the changes I need to do ( any files which I need to configure to get the latest repository code to run locally )
Would we need to version control the Wordpress including the Database?
Please advise.
Yes the main issue you have there is all the things you want are within the database. There are version control things for db but not sure how best they work... so you either export and share you db with them, or all work off a remote db from a server. You can change db credentials, including ip address etc in wp-config.
As for version control, I only save my theme in git and the wp-config etc etc... the bare minimum I can. Then I use composer https://getcomposer.org/ to pull in wordpress and make use of https://wpackagist.org/ to get plugins.
Roots did a nice introduction to composer and WordPress - where I started learning from and is worth a look: https://roots.io/using-composer-with-wordpress/
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?
I have a Wordpress blog hosted on Heroku.
I'm trying to figure out how to clone the site from Heroku so that I can do my WP development locally (I've set up VVV locally - works like a dream).
I've tried backing up the Heroku site with WP Clone and it fails because Heroku's PHP install doesn't include zlib (I know how to install plugins and have installed and activated the WP Clone plugin, but it screams for zlib when attempting to backup).
I've tried WPManage and it can connect to the Heroku site, but when I try to backup I get a 500 internal server error.
Has anyone had success cloning, or backing up, a WP site and database that is hosted on Heroku? How? Different cloning tools to try?
I'd suggest you do it manually if you planned to do it locally. XAMMP or WAMP?
Just backup your user data, images, plugin and database.
A tool that I have good success with is Duplicator. You're biggest issue is that your PHP config is missing required libs that wordpress needs to function properly.
I would look at getting a PHP install that has zlib in as wordpress itself uses it. See What are PHP extensions and libraries WP needs and/or uses?
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)