-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WordPress configuration and salt generation methods
Three utility functions are introduced in utils.js to enhance security and ease of use for WordPress installations. replaceDbConstant(configContent, constantName, userDefinedValue) replaces a constant in wp-config.php with a user-defined value. generateSalt() creates a random salt code, and replaceEmptySalts(configContent) replaces empty salt place holders in the wp-config.php with generated salt codes. These functions allow users to easily replace database constants and salts in WordPress configurations without having to manually edit wp-config.php. The exported functions of utils.js were also updated to incorporate these new methods. In the Package class, the way of updating WordPress configurations was changed to use these new utility functions, making the code cleaner and more readable. wp-package.json was modified to change the name, DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST to more meaningful, user-defined values. New scripts field was also added to package.json to standardize the entry point for the application. The readme.md file has been updated to reflect these changes, with the version number incremented accordingly. Overall, this commit improves the security and usability of the tool, by allowing automatic generation and configuration of constants and salts in the wp-config.php file.
- Loading branch information
Showing
5 changed files
with
80 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters