How to call WordPress functions in a custom PHP script

后端 未结 7 459
小蘑菇
小蘑菇 2020-12-07 16:52

I have a PHP script I want to use for creating a new blog in WPMU. I am having trouble calling WordPress functions like wpmu_create_user and wpmu_create_blog.

My hop

7条回答
  •  有刺的猬
    2020-12-07 17:19

    For wordpress 3.1, I had to specify the host/domain because wp-includes/ms-settings.php:100 needs it or it dies. So my script looks something like (note I am using it for a network/multiblog site):

    #!/usr/bin/php -q
    
    prefix; 
    ?>
    

提交回复
热议问题