cliverlong
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Cannot upload posts and media to WordPress running on Ubuntuthis thread has been marked as resolved.
Forum: Fixing WordPress
In reply to: Cannot upload posts and media to WordPress running on UbuntuFirst , the chown command you documented above seems to have fixed the issues to the import / export plug-ins not running. Thank-you.
I am working my way through the plug-in: WP All Import. The plug-in is importing posts but I may have a fair amount of work to map fields from the XML file and I’m not clear yet how to import images. If I have specific issues with the use of one of the import plug-ins I will create a new forum post.
Thanks again.
Forum: Fixing WordPress
In reply to: Cannot upload posts and media to WordPress running on UbuntuCliverlong, part of my confusion is–or maybe just was–that I wasn’t sure if this was a WSL install, (or Mac equivalent), wherein Windows or Mac was the actual OS, or if it was an actual standalone Ubuntu server.
I am very grateful for the time and detail you are putting in to try to help me in this.
Now I feel I’m getting into territory where you might already know what I’m about to say, & it feels condescending. If so, apologies in advance. Here goes. To find hidden files on a Linux system, you use the command ls /a (perhaps combined w/other options as well). If you’re using a GUI, then please ensure your file manager is set to show hidden files.
My Linux knowledge is very fragmentary – I pick things up as I need them – so I may lack some ‘obvious’ knowledge. Any suggestions for actions or fixes are most gratefully received by me.
As per your instruction, the command ls -a has found the .htaccess file. See below:
clive@clive-EB1033:/var/www$ ls -a . .. crl_h5p html wordpress
clive@clive-EB1033:/var/www$ cd wordpress/ -bash: cd: wordpress/: Permission denied
clive@clive-EB1033:/var/www$ sudo su [sudo] password for clive:
root@clive-EB1033:/var/www# ls -a . .. crl_h5p html wordpress
root@clive-EB1033:/var/www# cd wordpress/
root@clive-EB1033:/var/www/wordpress# ls -a . robots.txt wp-config-sample.php wp-login.php .. wp-activate.php wp-content wp-mail.php .htaccess wp-admin etc. etc…..
I think you said yes, but are you able to view the XML files you’ve exported? You can do that w/any text editor.
An extract from the start of the extracted XML file follows:
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. It contains information about your site's posts, pages, comments, categories, and other content. You may use this file to transfer that content from one site to another.>
The web server files should belong to the webserver group. In Apache, that’s generally www-data. Files in the var/www subfolder (which appears to be where you’re housing the site), should have permissions of 644 & directories/subdirectories of 755. If after the above you still can’t find a .htaccess file, Theme Isle gives some tips on how to create 1: https://themeisle.com/blog/htaccess-file-in-wordpress/
Is the following the required information about the file permissions?
root@clive-EB1033:/var/www/wordpress# ls -l .htaccess -rw-r----- 1 www-data www-data 261 Apr 12 06:18 .htaccess
If we haven’t found success w/these steps, perhaps please consider using pastebin or similar to where we can look at your Apache & PHP configuration files. I have to admit I’m more of an Nginx gal myself, but I can probably find my way through Apache. Nginx can at first be a headache to set up, but the performance is often superior. Since this is a local install, though, the additional work probably isn’t worth it, accept, perhaps, as a learning exercise if the time ever comes to set it up on a VPS. Another thing you might find helpful–& it’s always my first goto when my server’s acting wonky–is to consult my error logs. They’ll either be in /var/log/apache2 or /var/log/httpd. If you’re not quite sure what they’re telling you, then again, perhaps paste 1 into pastebin w/some questions, & we can help w/that. Let’s see what this gets us. We’ll get this resolved.
Here are the list of the contents of /var/log/apache2 and the contents of some of the files. I can’t see anything immediately relevant to my problem of not be able to upload the WordPress posts and media:
root@clive-EB1033:/var/log# cd apache2/ root@clive-EB1033:/var/log/apache2# ls access.log access.log.3.gz error.log.1 error.log.4.gz access.log.1 access.log.4.gz error.log.10.gz error.log.5.gz access.log.10.gz access.log.5.gz error.log.11.gz error.log.6.gz access.log.11.gz access.log.6.gz error.log.12.gz error.log.7.gz access.log.12.gz access.log.7.gz error.log.13.gz error.log.8.gz access.log.13.gz access.log.8.gz error.log.14.gz error.log.9.gz access.log.14.gz access.log.9.gz error.log.2.gz other_vhosts_access.log access.log.2.gz error.log error.log.3.gz
root@clive-EB1033:/var/log/apache2# cat access.log
root@clive-EB1033:/var/log/apache2# cat error.log.1 [Tue Sep 12 14:21:13.456239 2023] [mpm_prefork:notice] [pid 1340] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Sep 12 14:21:13.456342 2023] [core:notice] [pid 1340] AH00094: Command line: '/usr/sbin/apache2' [Tue Sep 12 14:43:42.226967 2023] [mpm_prefork:notice] [pid 1340] AH00170: caught SIGWINCH, shutting down gracefully [Tue Sep 12 14:43:43.729282 2023] [mpm_prefork:notice] [pid 6294] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Sep 12 14:43:43.729561 2023] [core:notice] [pid 6294] AH00094: Command line: '/usr/sbin/apache2' [Tue Sep 12 15:29:39.902467 2023] [mpm_prefork:notice] [pid 6294] AH00170: caught SIGWINCH, shutting down gracefully [Tue Sep 12 15:42:22.811138 2023] [mpm_prefork:notice] [pid 1333] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Sep 12 15:42:22.856012 2023] [core:notice] [pid 1333] AH00094: Command line: '/usr/sbin/apache2' [Tue Sep 12 22:26:10.937770 2023] [mpm_prefork:notice] [pid 1333] AH00170: caught SIGWINCH, shutting down gracefully [Tue Sep 12 22:26:59.725969 2023] [mpm_prefork:notice] [pid 1250] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Tue Sep 12 22:26:59.768772 2023] [core:notice] [pid 1250] AH00094: Command line: '/usr/sbin/apache2' [Sun Sep 17 14:06:43.597753 2023] [mpm_prefork:notice] [pid 1250] AH00171: Graceful restart requested, doing restart AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message root@clive-EB1033:/var/log/apache2# cat error.log [Sun Sep 17 14:06:43.974417 2023] [mpm_prefork:notice] [pid 1250] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations [Sun Sep 17 14:06:43.974525 2023] [core:notice] [pid 1250] AH00094: Command line: '/usr/sbin/apache2' root@clive-EB1033:/var/log/apache2#
- This reply was modified 1 year, 5 months ago by cliverlong.
Forum: Fixing WordPress
In reply to: Cannot upload posts and media to WordPress running on UbuntuThanks again for your prompt and thorough response. I have used “inline code” tags to highlight quotes from your post as I can’t find how to quote text on this forum.
Ok, I guess I was unaware that this was a local install (did you mention that?) .
Yes, in my original post: Local wordpress: 6.3.1
At this point we also don’t know what tool, if any, you used to make your local install, & that would help immensely.
Unfortunately I can’t remember, but the resulting environment is: is WordPress 6.3.1 on Ubuntu 22.04 from my original post, Apache2 from my second post and MySQL.The standard tool used to import content is a plugin from the www.ads-software.com site. From your dashboard, please go to ‘Tools > Import’. Download the plugin, & follow the provided onscreen instructions.
I have tried the “standard” Import tool, see my original post. This has an upload limit of 2MB but I have increased this to 8MB using your instructions to modify php.ini
Please understand that the .htaccess file is hidden, so you’ll need to have your operating system set up to be able to see those. We don’t know what that is, so until we do, we can’t provide meaningful instructions.
As in my original post: Ubuntu 22.04
Again, as stated above, you don’t tell us what tool you used, if any, to do your local install. Please check the documentation on whatever tool you used, if applicable, because, some, like Xampp, actually require you run it w/administrative rights in order to set the proper read/write permissions.
The install process might have been Xampp, following a youtube video, I just can’t find any notes on what I did. However, I have a working, local WP environment using the software listed, where the only thing I can’t currently do is bulk upload posts and media from another WordPress environment (see post above).
Please let us know if this helps, and/or if you have further questions. It’s now officially coffee time.
I hope your coffee was enjoyable. Thanks again.- This reply was modified 1 year, 5 months ago by cliverlong. Reason: spelling error
Forum: Fixing WordPress
In reply to: Cannot upload posts and media to WordPress running on UbuntuThanks for your helpful and speedy reply.
1a. WordPress is using Apache2. If I enter https://localhost/html in my browser, the Apache2 default page is displayed.
1b. It is possible that although the machine is running Apache2, I just haven’t found the .htaccess file, rather than there not being one. I have listed the directories I searched for the .htaccess file in my original post (all under /var/www) but maybe I was searching incorrectly.
I updated upload_max_filesize to 8M in /etc/php/8.1/apache2/php.ini and restarted apache. post_max_size was already 8M.
I logged on to WordPress admin on my localhost and navigated to the “basic” import tool.
I saw the following error message: WP Import Export : If your .htaccess file weredo this automatically, but it isn’t. So you must either make it writable or manually update your .htaccess with the mod_rewrite rules found under WP Settings >> Permalinks. Until then, the exported and imported files are not protected from direct access.
However below this error message I saw the following: Choose a file from your computer: (Maximum size: 8 MB)
I selected the “Browse” button and no dialog appeared to select the xml file containing the exported WP posts.
I tried tool: Wp Smart Import > Import XML > Upload File and nothing occurred when I selected “Upload file”
I tried tool: Wp Imp Exp > New Import > Select Files. This went through several setup steps and attempted to process the exported xml file. The WP Imp Exp tools attempted to process the xml file but every record was rejected with message: ERROR : Content, title, and excerpt are empty.
So I cannot find a WP tool to import posts or media. This must be a very standard process when a WordPress site is migrated from on hosting service to another.
What tools do others successfully use for migration? IO have seen CPanel is used but this is very expensive for a one off migration for a personal, non-commercial WP Site.Forum: Fixing WordPress
In reply to: Cannot login to personal WordPress installed on home machineGeorge. I set the IP address statically to 192.168.1.128 (some amount of fiddling) and I can access the couple of pages I created and – more importantly – the WordPress/wp-login.php page .
i can now continue with experimenting uploading a copy of my public wordpress site to this new local host.
thanks.
Forum: Fixing WordPress
In reply to: Cannot login to personal WordPress installed on home machineAll those suggestions seem sensible to me. I will start off making the static address if the machine 192.168.1.128 and try to login. Then I will create a new database as it will be useful to go through that and make the site “localhost”, switching the IP address back to DHCP.
thanks for the very clear suggestions.
Forum: Fixing WordPress
In reply to: Cannot login to personal WordPress installed on home machineSome pregress, thanks.
If I enter in the browser address input: https://192.168.1.246/wordpress/wp-login.php
This displays a very simpleWordpress login page
but whatever userid and password I try, the page gets redirected :
https://192.168.1.128/wordpress/wp-login.php
witht eh error message :
This site can’t be reached
192.168.1.128?took too long to respond.
In the browser
Forum: Fixing WordPress
In reply to: Cannot login to personal WordPress installed on home machineI’m quite happy to wipe all the data on this wordpress and recreate the database if easier to fix.