在线服务器上的本地而不是Works字preSS现场工作 [英] wordpress site work on local but not works on online server

查看:156
本文介绍了在线服务器上的本地而不是Works字preSS现场工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的话,preSS站点正常工作本地服务器上,但是当我在服务器上上传这404找不到网页错误显示。

my wordpress site correctly working on local server but when i am uploading it on server 404 page not found error is showing.

我检查我的index.php其正确重定向。 这里是code: -

i check my index.php its correctly redirecting. here is code:-

      <?php

       define('WP_USE_THEMES', true);

       /** Loads the WordPress Environment and Template */
         require('./wp-blog-header.php');
             ?>

我检查我的可湿性粉剂博客 - header.php文件,它也working.because我转发给的phpinfo页面和信息页面显示,但网站页面不显示。 这里是WP-博客头code: -               

i check my wp-blog-header.php,its also working.because i forward it to phpinfo page and info page showing,but site page not showing. here is wp-blog-header code:-

             if ( !isset($wp_did_header) ) {

       $wp_did_header = flase;

  require_once( dirname(__FILE__) . '/wp-load.php' );

wp();

//wp_redirect( ABSPATH . WPINC . '/template-

          loader.php' , 301 );
                    // exit;
                require_once( ABSPATH . WPINC . '/template-loader.php' );
          }
          ?>

和我的温度,loader.php是: -

and my temp-loader.php is:-

       <?php
      /**
     * Loads the correct template based on the visitor's url
        * @package WordPress
       */
    if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
do_action('template_redirect');

     // Halt template load for HEAD requests. Performance bump. See #14348
       if( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) )
exit();

       // Process feeds and trackbacks even if not using themes.
       if ( is_robots() ) :
do_action('do_robots');
return;
    elseif ( is_feed() ) :
do_feed();
return;
       elseif ( is_trackback() ) :
include( ABSPATH . 'wp-trackback.php' );
return;
         endif;

    if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) :
$template = false;
if     ( is_404()            && $template = get_404_template()            ) :
elseif ( is_search()         && $template = get_search_template()         ) :
elseif ( is_tax()            && $template = get_taxonomy_template()       ) :
elseif ( is_front_page()     && $template = get_front_page_template()     ) :
elseif ( is_home()           && $template = get_home_template()           ) :
elseif ( is_attachment()     && $template = get_attachment_template()     ) :
    remove_filter('the_content', 'prepend_attachment');
elseif ( is_single()         && $template = get_single_template()         ) :
elseif ( is_page()           && $template = get_page_template()           ) :
elseif ( is_category()       && $template = get_category_template()       ) :
elseif ( is_tag()            && $template = get_tag_template()            ) :
elseif ( is_author()         && $template = get_author_template()         ) :
elseif ( is_date()           && $template = get_date_template()           ) :
elseif ( is_archive()        && $template = get_archive_template()        ) :
elseif ( is_comments_popup() && $template = get_comments_popup_template() ) :
elseif ( is_paged()          && $template = get_paged_template()          ) :
else :
    $template = get_index_template();
endif;
if ( $template = apply_filters( 'template_include', $template ) )
    include( $template );
return;
       endif;
         ?>

和我的htaccess的文件是: -

and my htaccess file is:-

    Options +FollowSymlinks
      RewriteEngine on
         # BEGIN WordPress
       <IfModule mod_rewrite.c>
          RewriteEngine On
         RewriteBase /
         RewriteCond %{REQUEST_FILENAME} !-f
           RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
        </IfModule>
        # END WordPress


    # PROTECT WP-CONFIG 
        <Files wp-config.php> 
           order Allow,Deny 
          Deny from all
           </Files>

PLZ告诉我,我怎么经营我的网站上线。

plz tell me how i run my site online.

推荐答案

这是一个非常令人沮丧的问题确实用字preSS时。但我会尽力分享一些经验,我有。

This is a really frustrating problem when using WordPress indeed. But I'll try to share some experiences I had.

0) 启用调试模式 < /一>:在wp-config.com变化WP_DEBUG为TRUE,加上下面几行:

0) Enable debugging mode: In wp-config.com change WP_DEBUG to TRUE and add the following lines:

error_reporting(E_ALL);
ini_set('display_errors', true);

通过这一点,我们必须WP显示了更多的错误比我们想要的;)

With this, we'll have WP showing up more errors than we want ;)

提示:用它在本地计算机作出防弹插件/主题/项目

1)检查404是从默认浏览器或字preSS :尝试访问可湿性粉剂管理员的URL。这是检查是否域设置正确的好方法。有时,错误是index.php文件不被发现,因此,我们需要加载的东西,不会关心插件和主题,这就是我建议使用可湿性粉剂管理员的原因。

1) Check if the 404 is from the default browser or from wordpress: Try to access wp-admin url. This is a good way to check if the domain is properly set. Sometimes the error is that index.php is not being found, so, we need to load something that will not care for the plugins and themes, that's the reason I suggest to use the wp-admin.

提示:即使一个主题少安装,将有可湿性粉剂管理员的工作

2)删除任何可能的问题:如果我们不能准确地找到什么是错的previous步骤,我们需要变脏:重命名的主题插件文件夹,确保问题不是任何插件。

2) Remove anything that can be the problem: If we can't find exactly what's wrong on previous steps, we need to get dirty: rename the THEMES and PLUGINS folders to ensure that the problem isn't any of the plugins.

提示:在一个插件文件的开头,有时一个空白行可以完全地打破你的项目

3)给的链接:我不能评论,但我会很高兴帮助你,如果你给我一个链接以查看错误

3) Give a link: I can't comment yet, but I'll be glad on helping you if you send me a link to see the error.

这篇关于在线服务器上的本地而不是Works字preSS现场工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆