Difference between revisions of "Wordpress errors"

From KOP KB
Jump to: navigation, search
(WP-Config Editing)
Line 10: Line 10:
 
If you see a blank page it could be because the installer had wrong info or something is missing in htacces, this default htaccess could also help with people logging and wp permalinks working correctly
 
If you see a blank page it could be because the installer had wrong info or something is missing in htacces, this default htaccess could also help with people logging and wp permalinks working correctly
  
=== WP-Config Editing ===
+
== WP-Config Editing ==
  
 
There is several other things you can edit in the config file but for this purpose or any database errors you would want to look for the following things within your wp-config file.
 
There is several other things you can edit in the config file but for this purpose or any database errors you would want to look for the following things within your wp-config file.
Line 29: Line 29:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Default Htaccess ===
+
== Default Htaccess ==
 
make sure the following is in the htaccess file in the same folder as the folder with wordpress in it. Also depending on the version you may require different information in the htaccess file which you can refer to the source link.
 
make sure the following is in the htaccess file in the same folder as the folder with wordpress in it. Also depending on the version you may require different information in the htaccess file which you can refer to the source link.
 
Source: http://codex.wordpress.org/htaccess
 
Source: http://codex.wordpress.org/htaccess
Line 43: Line 43:
 
</IfModule>
 
</IfModule>
 
# END WordPress
 
# END WordPress
 +
</syntaxhighlight>
 +
== Manual Theme Changing ==
 +
Another part of the issue is changing the template manually to something else.
 +
<syntaxhighlight lang="sql">
 +
SELECT *
 +
FROM wp_options
 +
WHERE option_name = 'template'
 +
OR option_name = 'stylesheet'
 +
OR option_name = 'current_theme';
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 20:37, 24 November 2014

Redeclare get_temp_dir() error

Error: Fatal Error: Cannot redeclare get_temp_dir() (previously declared in /home/public_html/wp-includes/functions.php:2160) in /home/public_html/wp-admin/includes/file.php on line 189

Solution: Reinstall all WP core files. To keep the plugins, themes and content. Just deleted WP-Admin and uploaded the fresh version and the same for the functions.php.

Source: https://wordpress.org/support/topic/upgrade-from-wp-314-to-wp-32-admin-error-cannot-redeclare-get_temp_dir

Blank Page

If you see a blank page it could be because the installer had wrong info or something is missing in htacces, this default htaccess could also help with people logging and wp permalinks working correctly

WP-Config Editing

There is several other things you can edit in the config file but for this purpose or any database errors you would want to look for the following things within your wp-config file.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'Database-name');

/** MySQL database username */
define('DB_USER', 'Database-username');

/** MySQL database password */
define('DB_PASSWORD', 'Db-password');

/** MySQL hostname */
// Depending on your host you may have a different local host name or a remote hostname that you would need to provide
define('DB_HOST', 'localhost');

Default Htaccess

make sure the following is in the htaccess file in the same folder as the folder with wordpress in it. Also depending on the version you may require different information in the htaccess file which you can refer to the source link. Source: http://codex.wordpress.org/htaccess

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

Manual Theme Changing

Another part of the issue is changing the template manually to something else.

SELECT *
FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';