Created
October 30, 2012 14:51
-
-
Save HowardMei/3980661 to your computer and use it in GitHub Desktop.
New Wordpress Install Profile
This file contains hidden or 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
| <?php | |
| //$base_dir = '/home/username/www/wordpress'; | |
| //chdir($base_dir); | |
| define( 'WP_SITEURL', 'http://localhost/wordpress' ); | |
| define( 'WP_INSTALLING', true ); | |
| require_once 'wp-load.php'; | |
| require_once 'wp-admin/includes/upgrade.php'; | |
| require_once 'wp-includes/wp-db.php'; | |
| /* Install Profile */ | |
| $title = 'Testando instalação por wp_install'; | |
| $username = 'admin'; | |
| $email = 'admin@localhost'; | |
| $password = '123456'; | |
| $blog_public = true; | |
| wp_install( $title, $username, $email, $blog_public, null, $password ); | |
| /* Add Settings */ | |
| update_option( 'blogdescription', 'Nova descrição do blog :D' ); | |
| update_option( 'timezone_string', 'America/Sao_Paulo' ); | |
| update_option( 'admin_email', $email ); | |
| /* Redirect to login */ | |
| wp_redirect( wp_login_url() ); | |
| exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment