将现有的wordpress网站迁移到azure后,在导入xml内容后会显示一个空白页面

时间:2015-08-27 22:34:33

标签: php mysql wordpress azure content-management-system

我正在将现有的单词新闻网站移动到azure,我正在尝试使用Tools =>导入,我安装了“导入WordPress”插件,但在上传XML后需要几分钟时间并向我显示一个空白页面,然后我注意到没有导入任何帖子,评论,页面等。

2 个答案:

答案 0 :(得分:0)

导入.XML文件时,是否有成功导入的消息?或者是一些错误的信息?

通常这种情况下WordPress迁移是关于内存限制的,你可以在你的wp-settings.php中更改它

如果您有32 M,请将其更改为128M,然后重试。

import Foundation, objc

NSUserNotification = objc.lookUpClass('NSUserNotification')
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
NSObject = objc.lookUpClass('NSObject')


class NotificationDelegator(NSObject):

    def userNotificationCenter_didActivateNotification_(self, center, notification):
        print "user notification center"

    def userNotificationCenter_shouldPresentNotification_(self, center, notification):
        return True

delegator = NotificationDelegator.alloc().init()


def notify(title, subtitle, info_text, delay=1, sound=False, userInfo={}):
    """ Python method to show a desktop notification on Mountain Lion. Where:
        title: Title of notification
        subtitle: Subtitle of notification
        info_text: Informative text of notification
        delay: Delay (in seconds) before showing the notification
        sound: Play the default notification sound
        userInfo: a dictionary that can be used to handle clicks in your
                  app's applicationDidFinishLaunching:aNotification method
    """
    notification = NSUserNotification.alloc().init()
    notification.setTitle_(title)
    notification.setSubtitle_(subtitle)
    notification.setInformativeText_(info_text)
    notification.setUserInfo_(userInfo)
    if sound:
        notification.setSoundName_("NSUserNotificationDefaultSoundName")
    center = NSUserNotificationCenter.defaultUserNotificationCenter()
    center.setDelegate_(delegator)
    center.deliverNotification_(notification)

如果您在共享托管中,则需要与您的提供商交谈,如果不确定您是否有内存来上传大文件。

答案 1 :(得分:0)

我将本地WordPress的所有内容导出到Azure平台,但我仍然无法重现您的问题。您是否可以提供XML片段以供进一步讨论?

为了找到问题的原因,您需要打开 display_errors 设置以检查是否有任何PHP错误,要在Azure上配置PHP设置,您可以按照步骤操作:

1,将.user.ini文件添加到根目录。

2,使用您在php.ini文件中使用的相同语法将配置设置添加到.user.ini文件。根据您的需求,您的.user.ini文件将包含以下文本:

display_errors = On ; Maximum size of POST data that PHP will accept, If needed. post_max_size = 20M

3,部署您的网络应用。

4,重新启动网络应用。

此外,我们可以使用FTP工具或WebMatrix连接Azure网站服务器,以创建和修改自定义配置文件。

将现有应用程序迁移到Azure Web Apps的另一种方法是,我们可以使用FTP工具或Git将整个应用程序文件夹上载到Azure上的根目录。

您可以在this thread上查看分步参考。

默认根目录为D:\home\site\wwwroot