{"id":2021,"date":"2019-01-01T11:00:30","date_gmt":"2019-01-01T11:00:30","guid":{"rendered":"http:\/\/www.softaculous.com\/blog\/?post_type=docs&#038;p=2021"},"modified":"2020-05-21T08:53:06","modified_gmt":"2020-05-21T08:53:06","slug":"custom-wordpress-package","status":"publish","type":"docs","link":"https:\/\/www.softaculous.com\/blog\/docs\/developers\/extending-softaculous\/custom-wordpress-package\/","title":{"rendered":"Custom WordPress Package"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>This guide will help you how to modify the existing WordPress package in Softaculous and add it as a Custom Script.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For testing your Custom Script on your localhost before uploading it to your server you can download&nbsp;<strong>AMPPS<\/strong>&nbsp;and install it:<br><a href=\"http:\/\/www.ampps.com\/download\">http:\/\/www.ampps.com\/download<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First you need to choose a name for your custom package and a softaculous name (a short simple name without any special chars) for your custom package.<br>In this guide we take the following names as an Example&nbsp;:<br>Name&nbsp;:&nbsp;<strong>My WordPress Package<\/strong>&nbsp;<br>Softaculous Name&nbsp;:&nbsp;<strong>mywp<\/strong><\/p>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>NOTE<\/strong>&nbsp;: The package files should be placed the the&nbsp;<strong>\/path\/to\/scripts\/SOFTNAME\/<\/strong>&nbsp;directory with the same name as the Softaculous name you choose for adding the script in Softaculous. In this case&nbsp;<strong>\/var\/softaculous\/mywp\/*<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Copy the WordPress package<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First copy the original WordPress package files to your custom package directory.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">mkdir \/var\/softaculous\/mywp\/\ncp -r \/var\/softaculous\/wp\/* \/var\/softaculous\/mywp\/\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You have now copied the package to your custom package directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Rename the package files<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now rename the files to make it work with your custom Softaculous name.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">mv \/var\/softaculous\/mywp\/wp.zip \/var\/softaculous\/mywp\/mywp.zip\nmv \/var\/softaculous\/mywp\/wp.sql \/var\/softaculous\/mywp\/mywp.sql<\/pre>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>NOTE<\/strong>:  If the wp.zip and wp.sql is not there at \/var\/softaculous\/wp\/ then you will need to install wordpress on your server so that the wp.zip and wp.sql will be downloaded at \/var\/softaculous\/wp\/ since Softaculous by default download small script package without the zip and sql file. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Add your Custom Content<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Unzip the&nbsp;<strong>mywp.zip<\/strong>&nbsp;and add your custom content i.e. plugins or themes as you require.<\/li><li>Now Zip the package and make sure the ZIP package contains the files directly and not in a sub-directory. The following should be the directory structure of your ZIP package&nbsp;:<br><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">wp-content\nwp-admin\nwp-includes\nindex.php\nand so on\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Add your content in SQL file<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Add your the custom content you need in the\u00a0<strong>mywp.sql<\/strong>\u00a0file.<\/li><li>You might need to make changes in SQL to activate your themes\/plugins.<\/li><li><strong>Hint<\/strong>\u00a0: You can install the theme\/plugin in a test WordPress installation and take the changes from the database of that installation.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Add branches to the custom script<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To list the custom script as branches, add the custom_branch tag in the info.xml of all the custom scripts as below:<\/p>\n\n\n\n<p class=\"php hljs wp-block-paragraph\">&lt;custom_branch&gt;10001&lt;\/custom_branch&gt;<br>&lt;custom_branch&gt;10002&lt;\/custom_branch&gt; <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, the 10001 and 10002 are the script id of the custom scripts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Modify other files (if needed)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Generally it is not required to modify any files but if you need you can modify the&nbsp;<strong>wp-config.php<\/strong>&nbsp;or any other file to make any changes you require.<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make any other final changes you want.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Add the package to Softaculous<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Once you have the package ready add it to Softaculous. You can refer to the following guide on how to add a package to Softaculous&nbsp;:&nbsp;<a href=\"https:\/\/softaculous.com\/docs\/Adding_Custom_Scripts\">Adding Custom Scripts<\/a><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Test the package<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>That&#8217;s it! You have successfully created a custom WordPress package.<\/li><li>Now it&#8217;s time to test your package and make sure it works fine.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you need to make a completely fresh package from scratch you may refer to the following guide&nbsp;:&nbsp;<a href=\"https:\/\/softaculous.com\/docs\/Making_Custom_Package\">Making Custom Package<\/a><\/p>\n","protected":false},"featured_media":0,"parent":1691,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","docs_category":[],"class_list":["post-2021","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/comments?post=2021"}],"version-history":[{"count":7,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2021\/revisions"}],"predecessor-version":[{"id":3640,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/2021\/revisions\/3640"}],"up":[{"embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/1691"}],"wp:attachment":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/media?parent=2021"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs_category?post=2021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}